[GHC] #10653: PatternSynonyms should be imported/exported as part of the wildcard notation

GHC ghc-devs at haskell.org
Sun Jul 19 08:22:30 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):

 I can see the point, but I'm not enthusiastic myself

  * It would mean that a programmer (and GHC) would need to do type
 inference even to figure out what the export `T(..)` meant.  That is,
 lexical scoping depends on type inference.  Currently Haskell never
 requires type inference to figure out scoping.  Changing this would entail
 some fairly radical changes in the compiler.

  * It's not clear why you might dignify smart patterns, but not smart
 constructors.  We often use "smart constructors" and it would make the
 same kind of sense to export those too with `T(..)`.  Perhaps any function
 whose result type was `T`?  I just don't see a good place to stop with
 this line of thought.

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


More information about the ghc-tickets mailing list