GHC exits with error
William Lee Irwin III
wli at holomorphy.com
Tue Jan 16 04:13:07 EST 2001
After some naive toying around, I discovered the following program
caused a runtime error in the GHC compiler itself:
> module Set (
> Set,
> )
> where
> import List
> 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
> (Set xs) >>= k = Set $ foldr (union . (\(Set ys) -> ys) . k) [] xs
> return x = Set [x]
The error this caused was the following:
rename/RnEnv.lhs:238: Non-exhaustive patterns in function get_tycon_key
Cheers,
Bill
More information about the Glasgow-haskell-bugs
mailing list