
#8581: Pattern synonym used in an expression context could have different constraints to pattern used in a pattern context -------------------------------------+------------------------------------- Reporter: cactus | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Replying to [comment:41 dfeuer]:
[Allowing an expression-only "pattern synonym"] emphasizes the orthogonality of pattern synonyms and constructor synonyms; I tend to find orthogonal features easier to understand. The current reuse of the `where` keyword to add a constructor synonym is also troubling. It would feel cleaner to me to let these be completely separate declarations.
OK. I still don't want this feature, but I understand your reason.
BTW, what ever happened to the idea of letting a module re-export a type
and associate pattern synonyms with it? I lost track of that and haven't had a chance to upgrade to 8.0 yet. This is implemented, as described (very briefly) in the second half of [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts... #import-and-export-of-pattern-synonyms this section] of the user manual. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8581#comment:42 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler