1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

Sort the Unit carrier after its handler.

This commit is contained in:
Rob Rix 2018-12-12 09:47:00 -05:00
parent e7bc7e0e31
commit 1d4421e512

View File

@ -208,13 +208,13 @@ instance HFunctor (Unit value) where
instance Effect (Unit value) where
handle state handler (Unit k) = Unit (handler . (<$ state) . k)
newtype UnitC value m a = UnitC { runUnitC :: m a }
runUnit :: Carrier (Unit value :+: sig) (UnitC value (Eff m))
=> Evaluator term address value (UnitC value (Eff m)) a
-> Evaluator term address value m a
runUnit = raiseHandler $ runUnitC . interpret
newtype UnitC value m a = UnitC { runUnitC :: m a }
data String value (m :: * -> *) k
= String Text (value -> k)