Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 549a45b

Browse files
author
Jake Brownson
committed
make type Pure use an empty row instead of rank-2 types
1 parent f914b2e commit 549a45b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Control/Monad/Eff.purs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ foreign import bindE :: forall e a b. Eff e a -> (a -> Eff e b) -> Eff e b
2121
-- | The `Pure` type synonym represents _pure_ computations, i.e. ones in which all effects have been handled.
2222
-- |
2323
-- | The `runPure` function can be used to run pure computations and obtain their result.
24-
type Pure a = forall e. Eff e a
24+
type Pure a = Eff () a
2525

2626
-- | Run a pure computation and return its result.
27-
-- |
28-
-- | Note: since this function has a rank-2 type, it may cause problems to apply this function using the `$` operator. The recommended approach
29-
-- | is to use parentheses instead.
3027
foreign import runPure :: forall a. Pure a -> a
3128

3229
instance functorEff :: Functor (Eff e) where

0 commit comments

Comments
 (0)