Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 1e3e8dd

Browse files
committed
Use the RightModule instance for CoreF to define the Monad instance for Core.
1 parent e63e047 commit 1e3e8dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

semantic-core/src/Data/Core.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ instance Applicative Core where
6666
(<*>) = ap
6767

6868
instance Monad Core where
69-
a >>= f = iter id Core Var f a
69+
Var a >>= f = f a
70+
Core c >>= f = Core (c >>=* f)
7071

7172
instance Carrier CoreF Core where
7273
eff = Core

0 commit comments

Comments
 (0)