summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_fail/T1899.hs
blob: a49b647be7f3ee2e4c4fe76e926373016b034236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- Test for Trac #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)]
                 ]