[GHC] #15505: Assertion failures in tests T7224, T9201, LevPolyBounded

GHC ghc-devs at haskell.org
Tue Aug 21 14:58:27 UTC 2018


#15505: Assertion failures in tests T7224, T9201, LevPolyBounded
-------------------------------------+-------------------------------------
        Reporter:  osa1              |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler (Type    |              Version:  8.5
  checker)                           |
      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 simonpj):

 Problem is that

 * we call `zonkTcTypeToType` from `zonkTcMethInfoToMethInfo`, in
 `tcTyClDecl1` on class decls
 * when there is an unsolved (actually insoluble) residual constraint
 * the `CoVarHole` for that equality constraint is, of course (since it is
 solved)
 * but the zonker complains about an unfilled-in coercion hole.

 The assertion for an unfilled coercion hole is skipped if there are any
 type errors (and rightly so): see `TcHsSyn.zonkCoHole`.  But at this
 moment we'd only called `zonkLocalEqualities` not `zonkEqualities`, so we
 hadn't actually added the error to in the Tc monad.

 Solution: call `solveEqualities` in `tcTyClDecl`.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15505#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list