mirror of
https://github.com/github/semantic.git
synced 2024-12-14 17:31:48 +03:00
Define a carrier type for Unit.
Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
This commit is contained in:
parent
bbad0f54ed
commit
d7550e5b65
@ -25,6 +25,7 @@ module Control.Abstract.Value
|
|||||||
, runWhile
|
, runWhile
|
||||||
, WhileC(..)
|
, WhileC(..)
|
||||||
, Unit(..)
|
, Unit(..)
|
||||||
|
, UnitC(..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Abstract.Evaluator
|
import Control.Abstract.Evaluator
|
||||||
@ -198,6 +199,7 @@ instance HFunctor (Unit value) where
|
|||||||
instance Effect (Unit value) where
|
instance Effect (Unit value) where
|
||||||
handle state handler (Unit k) = Unit (handler . (<$ state) . k)
|
handle state handler (Unit k) = Unit (handler . (<$ state) . k)
|
||||||
|
|
||||||
|
newtype UnitC value m a = UnitC { runUnitC :: m a }
|
||||||
|
|
||||||
class Show value => AbstractIntro value where
|
class Show value => AbstractIntro value where
|
||||||
-- | Construct an abstract unit value.
|
-- | Construct an abstract unit value.
|
||||||
|
Loading…
Reference in New Issue
Block a user