1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Use the RightModule instance for CoreF to define the Monad instance for Core.

This commit is contained in:
Rob Rix 2019-07-17 11:24:57 -04:00
parent e63e04724a
commit 1e3e8dd425
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -66,7 +66,8 @@ instance Applicative Core where
(<*>) = ap
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
eff = Core