[GHC] #12680: Permit type equality instances in signatures

GHC ghc-devs at haskell.org
Mon Oct 10 19:14:04 UTC 2016


#12680: Permit type equality instances in signatures
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |
      Resolution:                    |             Keywords:  backpack
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 ezyang):

 > type S is much better, because users can't make any assumptions about a
 type declaration that they might for a data declaration.

 As far as I could tell, GHC actually doesn't make any assumptions when
 `data S` denotes an abstract type; so it's just a syntactic wart. It's a
 bit bothersome to fix because hs-boot syntax only supports data.

 > It would be super awesome if the user could prove the equality manually.

 Do you have an example of a case where you could do this?

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


More information about the ghc-tickets mailing list