summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail015.hs
blob: ae929e397379d8ac6bc641319d09336182d829b4 (plain)
1
2
3
4
5
6
7
8
9
module ShouldFail where

data AList a = ANull | ANode a (AList a)

type IntList = AList Int

g (ANull) = 2
g (ANode b (ANode c d)) | b = c+1
                        | otherwise = 4