[GHC] #14463: Pattern synonym for appliation
GHC
ghc-devs at haskell.org
Tue Nov 14 20:53:08 UTC 2017
#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
More information about the ghc-tickets
mailing list