
#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 gridaphobe): Replying to [comment:5 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`.
Right, you would need a module that re-exported `(,)` in addition to a pattern synonym, e.g. {{{ module A ( (,)(..), pattern Q ) }}} so it's very unlikely to happen in practice. But, if you are re-exporting `(,)` from your module, I think it would be reasonable to attach the pattern synonyms that belong to `(,)`. I see this as module `A` providing its own view of pairs. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10653#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler