Skip to content

Commit

Permalink
refactor: Simplify std.effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Apr 4, 2019
1 parent 2a44a0d commit b9f0afc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions std/effect.glu
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ let { Functor, map } = import! std.functor
let { Applicative, wrap } = import! std.applicative
let { Monad } = import! std.monad

rec
type Arr r a b = a -> Eff r b

type Eff r a =
| Pure a
| Impure : forall x . (r x) -> (x -> Eff r a) -> Eff r a

type Arr r a b = a -> Eff r b
| Impure : forall x . (r x) -> Arr r x a -> Eff r a
in

let compose f g : (Arr r a b) -> (Arr r b c) -> (Arr r a c) = \a ->
match f a with
Expand Down

0 comments on commit b9f0afc

Please sign in to comment.