[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / interpreter / test / typechecker / t013.hs
1 --!!! Expr a (the classic existential types + polymorphic recursion example)
2
3 data Expr a = App (Expr (b -> a)) (Expr b)
4             | K a
5
6 eval :: Expr a -> a
7 eval (App f x) = (eval f) (eval x)
8 eval (K x)     = x