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

Commit

Permalink
Merge pull request #7 from jbrownson/master
Browse files Browse the repository at this point in the history
make type Pure use an empty row instead of rank-2 types
  • Loading branch information
paf31 committed Sep 12, 2015
2 parents f914b2e + 1c6bf7d commit 972d5fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
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

0 comments on commit 972d5fb

Please sign in to comment.