[GHC] #1454: Confusing or bug: :t and :i don't return same type
GHC
trac at galois.com
Mon Jun 25 07:45:25 EDT 2007
#1454: Confusing or bug: :t and :i don't return same type
----------------------------------+-----------------------------------------
Reporter: iampure at gmail.com | 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
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list