summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/tc035.hs
blob: b8dd5543736d46b4f588985d6174bbc0f4ebfa0d (plain)
1
2
3
4
5
6
7
8
9
module ShouldSucceed where

type AnnExpr a = (a,Expr a)

data Expr a = Var [Char]
              | App (AnnExpr a) (AnnExpr a)

g (a,(Var name)) = [name]
g (a,(App e1 e2)) = (g e1) ++ (g e2)