[GHC] #13775: Type family expansion is too lazy, allows accepting of ill-typed terms

GHC ghc-devs at haskell.org
Mon Jun 5 20:22:35 UTC 2017


#13775: Type family expansion is too lazy, allows accepting of ill-typed terms
-------------------------------------+-------------------------------------
        Reporter:  fizruk            |                Owner:  diatchki
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.2
  checker)                           |             Keywords:
      Resolution:                    |  CustomTypeErrors
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 >  I think that this is more a question about how type functions work,
 rather than TypeError specifically.

 No, I don't think it is.  GHC ''never'' reports an error simply becuase it
 tries to evaluate `TypeError ..`. Rather, that call is stuck.  That in
 turn may mean that some constraint can't be solved.  And then, when
 reporting unsolved constraints, GHC looks for any nested calls to
 `TypeError` and reports them rather than the constraint itself.   You
 wrote this code!

 It's nothing to do with how much reduction takes place, IMHO.

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


More information about the ghc-tickets mailing list