
#10653: PatternSynonyms should be imported/exported as part of the wildcard notation -------------------------------------+------------------------------------- Reporter: gridaphobe | Owner: mpickering Type: feature request | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: | PatternSynonyms, 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): Your examples agree with my understanding of this proposal.
A possible restriction might be that you can only add `P` to an export of a data type `T` if `P`'s type has form `... -> T t1 ..tn`.
This has been suggested. I think it's a good idea. My guess is that it was removed because of concerns that the whole thing has to be resolved by the renamer. But I actually don't think this is problematic at all. The whole thing //is// resolved by the renamer. It's just that the typechecker does an extra validity check. One reason I like this restriction is that it agrees with our guiding principle: a library should be able to refactor what was previously a concrete type into an abstract one with pattern synonyms. Are there other opinions out there? And has anyone gone beyond Trac to solicit support? I've come around to thinking this is a good idea, but it would be nice to know that others do, too. Apologies if the answer to this is above -- only so many things can fit in my brain at once! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10653#comment:31 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler