logo       

Mysterious error from ghc6.2: msg#00014

lang.haskell.glasgow.bugs

Subject: Mysterious error from ghc6.2

# ghc -c FunnyError.hs

FunnyError.hs:7:
Couldn't match `Bool' against `[Char]'
Expected type: Bool
Inferred type: [Char]
In the definition of `b': b x "Foo" = ()
In the definition for method `b'

FunnyError.hs:9:
tcLookup: `FunnyError.$dmb' is not in scope
In the definition of `b': b = FunnyError.$dmb
In the definition for method `b'
In the instance declaration for `A Int'


The first error is correct, but the second error message is most peculiar,
is it not?
{- ghc6.2 -}
module FunnyError where

class A x where
a :: x -> ()
b :: x -> Bool -> ()
b x "Foo" = () -- deliberate type error

instance A Int where
a _ = ()
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise