Skip to content

Instantly share code, notes, and snippets.

@fronx
Last active January 1, 2016 16:19
Show Gist options
  • Save fronx/8169822 to your computer and use it in GitHub Desktop.
Save fronx/8169822 to your computer and use it in GitHub Desktop.
data Type = T String
| Type :-> Type -- infix! (must start with `:`)
deriving Show
int = T "Int"
main = do
print (int :-> int)
-- T "Int" :-> T "Int"
print ((int :-> int) :-> int :-> int)
-- ((T "Int" :-> T "Int") :-> T "Int") :-> T "Int"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment