blob: 2d22df20d4f63f74a55f14105536323f41bfc1ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{-# 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
-}
|