
But you don't have `+v` in 8.0. The type that you're seeing has been instantiated and then regeneralized, so all the variable ordering has been forgotten. I still claim that the internal types assigned to `f` are the same. You just can't ask GHCi for this type in 8.0. You could, though do a `pprTrace` or `traceTc` from `TcExpr.tcInferId` which can print out the uninstantiated type.
In your last sentence: that `k` really ought to be in scope throughout
#12549: Panic on ":t datatypeName" ---------------------------------+-------------------------------------- Reporter: johnleo | Owner: johnleo Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by johnleo): Replying to [comment:13 goldfire]: the type. If it's not, there's your bug! OK, I understand. Perhaps it is a bug in 8.0 as well then. The code seems to be instantiating variables in independent groups, in this case the group before the class constraint and then separately the group after the class constraint. If you know a reason for this let me know. Options for fixing it would include doing all the variables together whether they are before or after the constraint, or saving variables from early groups to be in scope for later groups (perhaps the two are essentially equivalent). I'll explore further. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12549#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler