[GHC] #14463: Pattern synonym for appliation

#14463: Pattern synonym for appliation -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Does this make sense {{{#!hs pattern f :$ x = f x }}} where `Just :$ False` is the same as the pattern `Just False`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14463 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14463: Pattern synonym for appliation -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 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 RyanGlScott):
Does this make sense
It certainly doesn't in my mind. You'd have to allow this sort of pattern: {{{#!hs foo (f x) = ... }}} To which I can't ascribe any sort of meaningful semantics at the value level. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14463#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14463: Pattern synonym for appliation -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: invalid | 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: | -------------------------------------+------------------------------------- Changes (by Iceland_jack): * status: new => closed * resolution: => invalid Comment: Why like this of course {{{#!hs destruct :: Either a a -> (String, a) destruct (Left a) = ("Left", a) destruct (Right a) = ("Right", a) pattern (:$) :: String -> a -> Either a a pattern f :$ x <- (destruct -> (f, x)) }}} ;) I agree that the idea is not meaningful, closing -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14463#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC