[GHC] #10653: PatternSynonyms should be imported/exported as part of the wildcard notation
GHC
ghc-devs at haskell.org
Tue Jul 21 09:35:39 UTC 2015
#10653: PatternSynonyms should be imported/exported as part of the wildcard
notation
-------------------------------------+-------------------------------------
Reporter: gridaphobe | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.11
Resolution: | Keywords: pattern
| synonyms
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by simonpj):
Yes, you do have to import-chase to figure out which ''subset'' of data
constructors are imported by `T(..)`. But there's an upper bound: it can
import no more than all the constructors.
With the new proposal, ''any'' old new pattern synonym could be brought
into scope by `T(..)`. That is new. Maybe it's not terrible, but it's
new.
Maybe one would want to associate more things with `T`? Such as a family
of functions over `T`, whether or not they are pattern synonyms?
Anyway I don't feel terribly strongly about all this ''provided'' it can
all be resolved by the renamer (ie not involving type inference). By all
means write a wiki page, seek feedback etc.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10653#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list