[Haskell-cafe] about GADTs on ghci

Yu-Teh Shen shenyute at gmail.com
Tue Nov 27 07:57:15 EST 2007


i have seen the documents in
http://www.haskell.org/haskellwiki/Generalised_algebraic_datatype
but i can not run the following code on ghci

ex:

data Term x where
    K :: Term (a -> b -> a)
    S :: Term ((a -> b -> c)  -> (a -> b) -> a -> c)
    Const :: a -> Term a
    (:@) :: Term (a -> b) -> (Term a) -> Term b
infixl 6 :@

could any tell me how to run the code?

Thanks a lot


More information about the Haskell-Cafe mailing list