[Haskell-cafe] Possible bug?
rendel at cs.au.dk
Fri Feb 13 12:26:18 EST 2009
Peter Verswyvelen wrote:
> Could it be considered a bug when a function compiles fine without type
> signature, but when you add the type signature that GHCi reports with
> :type, it fails to compile?
There are such cases where it is not a bug. For example, given
import Data.Map (fromList)
x a = fromList a
ghci will happily report that x has type
Ord k => [(k, a)] -> Data.Map.Map k a
but the name Data.Map.Map is not in scope in the module.
More information about the Haskell-Cafe