Created
April 5, 2017 19:42
-
-
Save xaviervia/55b0f8fe479914b46e532d3166d83a5b 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
interface Parseable a where | |
parse : String -> a | |
data Name : Type where | |
MkName : String -> Name | |
Parseable Name where | |
parse = MkName | |
data A : Type -> Type where | |
MkA : Parseable a => (a -> a) -> A a | |
f : Name -> Name | |
read : String -> A t -> t | |
read s (MkA f) = parse s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using it: