
28 Jan
2014
28 Jan
'14
7:29 a.m.
The simplest way would be to add a phantom type parameter to Exp, i.e. data Exp e a where The 'e' variable would be used to track (and propagate) effects. It is then up to you to design your 'effect system' as you wish. Jacques On 2014-01-28 6:03 AM, Corentin Dupont wrote:
-> In short, my question is: how can I semantically separate instructions with effect from the others? i.e. how can I mark down and track those effects?
This is the DSL:
data Exp a where ReadAccount :: Exp Int WriteAccount :: Exp Int -> Exp () SetVictory :: Exp Bool -> Exp () OnTimer :: Exp () -> Exp () Return :: a -> Exp a Bind :: Exp a -> (a -> Exp b) -> Exp b