Created
April 4, 2017 17:50
-
-
Save bvssvni/776ad5d97b9ecdbe7a4b12fe362aecd8 to your computer and use it in GitHub Desktop.
Attempt to generate a function type
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
data PathType = NAT | BOOL | |
interpPathType : PathType -> Type | |
interpPathType NAT = Nat | |
interpPathType BOOL = Bool | |
Func : Type | |
Func = (List PathType, PathType) | |
interp : Func -> Type | |
interp ([], b) = interpPathType b | |
interp (a :: as, b) = (interpPathType a) -> (interp (as, b)) | |
inc : Nat -> Nat | |
inc x = S x | |
foo : interp ([NAT], NAT) -> Nat | |
foo f = f 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment