[GHC] #4020: Please consider adding support for local type synonyms

GHC ghc-devs at haskell.org
Sun Oct 22 14:37:08 UTC 2017


#4020: Please consider adding support for local type synonyms
-------------------------------------+-------------------------------------
        Reporter:  nr                |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler (Type    |              Version:  6.12.2
  checker)                           |
      Resolution:                    |             Keywords:  type synonym
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 AntC):

 Replying to [ticket:4020 nr]:
 > I would really like to be able to put a type synonym in a where clause.

 Please explain why you couldn't declare the synonym at top level, as
 usual. Do you want the synonym to work wherever this module gets imported
 into? How will that go if it's nested?
 >
 > For an example use case, please see line 202 of the attachment.

 Please provide a more focussed example. Line 202 of 707. Do you really
 need 707 lines to explain the need?

 I suggest you make a proposal through the github process. (Or those who've
 recently added themselves to the ticket do.)

 Type synonyms are top level/global because all types and classes are.
 Otherwise type solving might be incoherent. -1 from me.

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


More information about the ghc-tickets mailing list