[GHC] #11594: closed empty type families fully applied get reduced lazily when in a constraint tuple and fully applied

GHC ghc-devs at haskell.org
Sat Feb 27 21:58:09 UTC 2016


#11594: closed empty type families  fully applied get reduced lazily when in a
constraint tuple and fully applied
-------------------------------------+-------------------------------------
        Reporter:  carter            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler (Type    |              Version:  7.10.2
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #9636             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by carter):

 So if I wanted a new userland insolvable type family that errors out
 eagerly rather than down stream, I'd have to have a type solver plugin
 active in the defining module to enforce that?

 I guess that would enable simulating the type error family in userland In
 7.10 right?
 I guess my main worry is that afaict, any type solver plugin usage forces
 ghc to rebuild
 The offending module every time. And then every down stream user possibly
 too!

 Or am I mis understanding your point?

 What if instead, when defining an empty closed type family, we could
 pragma
 Annotate it with "requires plugin foo" when we want this other plugin
 adhuncated semantics,
 Because otherwise requiring the offending type plugin is implicit in any
 down stream module!


 Replying to [comment:5 adamgundry]:
 > Replying to [comment:3 goldfire]:
 > > To paraphrase, you want GHC to recognize that an empty closed type
 family is insoluble.
 >
 > Note that empty closed type families are not necessarily insoluble in
 the presence of type-checker plugins. Indeed, the whole point of adding
 empty CTFs was to allow them to be given special reduction behaviour by
 plugins. So I think the implementation should be left alone (but for some
 contrasting views see the discussion on #9636).
 >
 > Documentation improvements are welcome, of course. :-)

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


More information about the ghc-tickets mailing list