Created
May 29, 2014 02:52
-
-
Save jroesch/0fc24965995257347d29 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| {-# LANGUAGE RankNTypes #-} | |
| data Result i r = Fail String | |
| | Done i r | |
| data ExType i a = ExType { extract :: forall r. a -> Result i r } | |
| fail :: String -> ExType i a | |
| fail s = ExType (\x -> Fail "bleh") |
This file contains hidden or 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
| module Example | |
| data Result i r = Fail String | |
| | Done i r | |
| data ExType i a = MkExType (r : Type ** a -> Result i r) | |
| fail : String -> ExType i a | |
| fail s = MkExType (_ ** (\x => Fail "bleh")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment