diff options
Diffstat (limited to 'testsuite/tests/rename/should_fail/rnfail026.hs')
-rw-r--r-- | testsuite/tests/rename/should_fail/rnfail026.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/rnfail026.hs b/testsuite/tests/rename/should_fail/rnfail026.hs new file mode 100644 index 0000000000..3256876e68 --- /dev/null +++ b/testsuite/tests/rename/should_fail/rnfail026.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE Rank2Types, FlexibleInstances #-} + +-- This one made ghc-4.08 crash +-- rename/RnEnv.lhs:239: Non-exhaustive patterns in function get_tycon_key +-- The type in the Monad instance is utterly bogus, of course + +module ShouldCompile ( Set ) where + + +data Set a = Set [a] + deriving (Eq, Ord, Read, Show) + +instance Functor Set where + f `fmap` (Set xs) = Set $ f `fmap` xs + +instance Monad (forall a. Eq a => Set a) where + return x = Set [x] + +instance Eq (forall a. [a]) where |