Created
May 12, 2020 13:33
-
-
Save tarquin-the-brave/e9db0562d02672f4300cec9f7d2ee410 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance Monad Prog where | |
return = Running | |
(Crashed e) >>= _ = (Crashed e) | |
(End prog) >>= k = k prog | |
(Running prog) >>= k = k prog | |
(AwaitInput prog) >>= k = k prog | |
instance MonadFail Prog where | |
fail = Crashed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment