diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T3155.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T3155.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T3155.hs b/testsuite/tests/typecheck/should_fail/T3155.hs new file mode 100644 index 0000000000..3a4c0d2f77 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T3155.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE GADTs, TypeOperators #-} +module T3155 where + +-- Test Trac #3155 +-- Gave bad error message in GHC 6.10 + +data Any s where + Any :: s ix -> ix -> Any s + +data AnyR s r where + AnyR :: s ix -> r ix -> AnyR s r + +unR :: (forall ix. r ix -> ix) -> AnyR s r -> Any s +unR f (AnyR ix rix) = Any ix (f rix) |