#1454: Confusing or bug: :t and :i don't return same type
----------------------------------+-----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
----------------------------------+-----------------------------------------
Comment (by simonpj):
Furthermore, even quoting verbatim what GHC says in the bad case is better
than describing in words the kind of thing it says.
Concerning Isaac's example, this is entirely expected behaviour. `:t`
typechecks an '''arbitrary expression'''. It happens to consist of a
single variable in this case bue it could be anything at all. E.g.
{{{
Prelude> :t map (* 2)
map (* 2) :: (Num a) => [a] -> [a]
}}}
So GHC generates all the constraints arising from the expression and then
abstracts over them. There's no reason for it to keep them in the same
order, and it doesn't. Mabye this is what iampure (I wonder what your
real name is) is tripping over?
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1454>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs