[GHC] #9117: Coercible constraint solver misses one

GHC ghc-devs at haskell.org
Mon May 19 17:10:19 UTC 2014


#9117: Coercible constraint solver misses one
-------------------------------------+------------------------------------
        Reporter:  goldfire          |            Owner:  nomeata
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.8.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by nomeata):

 Replying to [comment:11 goldfire]:
 > Actually, fixing this adds a nice feature to this whole area: the
 ability to have free conversions within a library but not to export this
 capability! If we have a newtype with a nominal role annotation, its
 constructor might be visible only among "friendly" modules, allowing the
 free conversion. Then, outside of the package, the constructor is
 inaccessible, so no conversions are possible. This ability was a
 desideratum at the beginning of the design process that we thought we
 threw away when we went with the idea of using class instances. But, now
 we have it back!

 True, but only for newtypes, there is currently no way for „I want to
 coerce under `Set` in my own modules only.“, that would require the are-
 all-type-constructors-in-scope test again.

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


More information about the ghc-tickets mailing list