[GHC] #12660: singletons doesn't compile with GHC 8.0.2 snapshot
GHC
ghc-devs at haskell.org
Tue Oct 4 19:10:06 UTC 2016
#12660: singletons doesn't compile with GHC 8.0.2 snapshot
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.0.2
Component: Compiler | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
I see what's going on, but I don't know why things are the way they are
nor how to fix.
The problem is, essentially, that we unflatten and then continue solving.
Then, we have a fuv (flattening unification variable) that's filled in
with the function it equals. So the flattener ends up bouncing between the
function application and its fuv (as found in the flat-cache).
The unflattening is happening in `TcInteract.solve_simple_wanteds`, as
called from `solveSimpleWanteds`. But then the `go` loop in the latter
goes around again. It does so in the same instance of the `TcS` monad, so
that flat-cache is retained, even though unflattening has happened. And
then we're in trouble.
Questions:
1. Should the flat-cache be wiped every time we unflatten?
2. Should we even allow unflattening in the `TcS` monad? I always thought
unflattening was about restoring nice-looking types for error messages and
something that should happen just as we leave the `TcS` monad. But we
shouldn't resume solving after unflattening, I think.
I'm afraid I've reached the limit of what I can do with this ticket.
Simon? :)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12660#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list