mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Use the RightModule instance for CoreF to define the Monad instance for Core.
This commit is contained in:
parent
e63e04724a
commit
1e3e8dd425
@ -66,7 +66,8 @@ instance Applicative Core where
|
|||||||
(<*>) = ap
|
(<*>) = ap
|
||||||
|
|
||||||
instance Monad Core where
|
instance Monad Core where
|
||||||
a >>= f = iter id Core Var f a
|
Var a >>= f = f a
|
||||||
|
Core c >>= f = Core (c >>=* f)
|
||||||
|
|
||||||
instance Carrier CoreF Core where
|
instance Carrier CoreF Core where
|
||||||
eff = Core
|
eff = Core
|
||||||
|
Loading…
Reference in New Issue
Block a user