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

make type Pure use an empty row instead of rank-2 types #7

Merged
merged 2 commits into from
Sep 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions docs/Control/Monad/Eff.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ instance monadEff :: Monad (Eff e)
#### `Pure`

``` purescript
type Pure a = forall e. Eff e a
type Pure a = Eff () a
```

The `Pure` type synonym represents _pure_ computations, i.e. ones in which all effects have been handled.
Expand All @@ -39,9 +39,6 @@ runPure :: forall a. Pure a -> a

Run a pure computation and return its result.

Note: since this function has a rank-2 type, it may cause problems to apply this function using the `$` operator. The recommended approach
is to use parentheses instead.

#### `untilE`

``` purescript
Expand Down
5 changes: 1 addition & 4 deletions src/Control/Monad/Eff.purs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ foreign import bindE :: forall e a b. Eff e a -> (a -> Eff e b) -> Eff e b
-- | The `Pure` type synonym represents _pure_ computations, i.e. ones in which all effects have been handled.
-- |
-- | The `runPure` function can be used to run pure computations and obtain their result.
type Pure a = forall e. Eff e a
type Pure a = Eff () a

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

instance functorEff :: Functor (Eff e) where
Expand Down