Bugs with fundeps
Marcin 'Qrczak' Kowalczyk
qrczak@knm.org.pl
2 Feb 2001 21:02:20 GMT
The first program let ghc -fglasgow-exts go into infinite loop printing
tcGetTyVar e{-a2145-}.
The second gives an error message about ambiguous type variable. Should
it be an error? It was not an error before.
The third causes panic.
------------------------------------------------------------------------
module Bug1 where
class Foo r a | r -> a where
foo :: a -> r
instance Foo (Maybe e) e where
foo = Just
bad:: Num e => Maybe e
bad = foo 0
------------------------------------------------------------------------
module Bug2 where
class Foo r a | r -> a where
foo :: r -> a
instance Foo [m a] (m a)
bad:: Monad m => m a
bad = foo bar
bar:: Monad m => [m a]
bar = []
------------------------------------------------------------------------
module Bug3 where
class Foo r a | r -> a where
foo :: r -> a
instance Foo [m a] (m a)
bad:: Monad m => m a
bad = foo bar
bar:: [m a]
bar = []
------------------------------------------------------------------------
--
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK