summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T1899.hs
blob: 835d8f1aa23ec227c004bcff639ba02900ca757d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- Test for #1899

module T1899 where

 data Constraint a = Formula [[Proposition a]]
 data Proposition a = Prop a
                    | Auxiliary [Proposition a]

 transRHS :: [a] -> Int -> Constraint a
 transRHS varSet b =
     if b < 0
       then Formula [[Prop (Auxiliary undefined)]]
       else Formula $
                 [[Prop (Auxiliary varSet),
                   Prop (Auxiliary varSet)]
                 ]