summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/rnfail026.hs
blob: d09d9fc22f168b169b11eaf9c27ece788fb0c662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE RankNTypes, 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