[GHC] #4020: Please consider adding support for local type synonyms
GHC
ghc-devs at haskell.org
Wed Nov 7 19:13:21 UTC 2018
#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 andreas.abel):
I just tried to declare a `type` synonym in a `where` clause and was
surprised that there is no GHC extension enabling this.
Rationale: If the type abbreviation is only used to simply type-
signatures of local functions, it should not have to be lifted to the top-
level.
See the Agda language why there is in principle no problem with having
local type definitions. In the worst case, the type definition will not
be in scope when trying to print it, but this problem already exists for
type synoyms that are not in scope because they have not been imported.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4020#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list