[GHC] #14292: Coercing between constraints of newtypes

GHC ghc-devs at haskell.org
Thu Sep 28 07:43:57 UTC 2017


#14292: Coercing between constraints of newtypes
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      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):

 I think the right thing to do here is to use a different flag for the
 "allow a representational role annotation on a class", or better yet to
 make it a per-role-annotation flag.

 Using `IncoherentInstances` for ''both'' that ''and'' the old meaning is
 asking for trouble.  I think we could make this change without hurting
 anyone much, because I bet that almost no one uses a representational role
 annotation on a class!

 (One other thought. Allowing per-decl things like `{-# OVERLAPS #-}` means
 you can't look at the top of the file and see what extensions it uses.
 Really we should have a language extensions `{-# LANGUAGE OverlapsAllowed
 #-}` or something, which enables the per-decl pragmas.   Doing that
 ''would'' have a bigger impact!)

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


More information about the ghc-tickets mailing list