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

GHC ghc-devs at haskell.org
Sun Jul 19 02:50:56 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 goldfire):

 Replying to [comment:4 gridaphobe]:
 > Replying to [comment:3 goldfire]:
 > > If `Q` belongs to pairs, then is it ever imported with `(..)` attached
 to some type? I would guess "no".
 >
 > Well I suppose it would be possible, since
 >
 > {{{
 > import GHC.Tuple ((,)(..))
 > }}}
 >
 > is a valid import declaration.

 Yes, but no pattern synonyms are defined in `GHC.Tuple`.

 > One question though, if I have a client module
 >
 > {{{
 > module B ( A(..) ) where
 > import A ( A(..) )
 > }}}
 >
 > does `B` now export `A1` under your scheme, or does it need to
 explicitly add `pattern A1` to the export declaration?

 Good point. I think it would make sense to re-export the patterns, but I
 see how this is perhaps problematic.

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


More information about the ghc-tickets mailing list