[GHC] #14813: EmptyCase thinks pattern match involving type family is not exhaustive, when it actually is
GHC
ghc-devs at haskell.org
Wed Aug 22 20:53:13 UTC 2018
#14813: EmptyCase thinks pattern match involving type family is not exhaustive,
when it actually is
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
| PatternMatchWarnings
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
* A `CHoleCan` ''is'' a `Ct`! (`CHoleCan` is a data constructor of `Ct`.)
* How exactly do I build a CHoleCan? Currently they are born in one
place, in `TcExpr.tcUnboundId`:
{{{
tcUnboundId rn_expr unbound res_ty
= do { ty <- newOpenFlexiTyVarTy -- Allow Int# etc (Trac #12531)
; let occ = unboundVarOcc unbound
; name <- newSysName occ
; let ev = mkLocalId name ty
; loc <- getCtLocM HoleOrigin Nothing
; let can = CHoleCan { cc_ev = CtWanted { ctev_pred = ty
, ctev_dest = EvVarDest ev
, ctev_nosh = WDeriv
, ctev_loc = loc}
, cc_hole = ExprHole unbound }
...
}}}
Perhaps you can copy that?
* Also, where exactly should I be calling tcNormalise? Call it in
`pmTopNormaliseType`. (It might need to become monadic to access the
ambient constraints.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14813#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list