
#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): Thank you, everything makes sense except "does not substitute in `rho`". Perhaps I misunderstood something, but it seems it is essential to substitute into `rho` at some point and nowhere else is it done, so if I leave that out the original skolem variables are never replaced with taus and unification fails later on. Indeed I tried this out and it failed: I get the error `No instance for (C k0 k1 a0) arising from a use of âfâ` when I try to do `:t f` for `class C a where f :: a b c`. If I leave in the substitution for `rho` everything seems to work fine. Note that I keep the unchecked substitutions in `deeply_instantiate` and only revert the one in `new_meta_tv_x` (which was the one causing the bug in the first place), since I'm worried making the other ones checked will cause other problems. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12549#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler