
#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 dfeuer): Replying to [comment:38 goldfire]:
A. None at all.
I'm very much in favor of A. See also #11646.
Now, onto design point (2). I wonder if it's helpful to think of pattern synonym types as a `(PatternType, Maybe Type)`.
I think what we actually want (borrowing from the [https://hackage.haskell.org/package/these these] package) is `These PatternType Type`. That is, either just the pattern, just the constructor, or both. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8581#comment:39 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler