[GHC] #12001: RFC: Add pattern synonyms to base
GHC
ghc-devs at haskell.org
Sun May 1 09:36:06 UTC 2016
#12001: RFC: Add pattern synonyms to base
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 7.10.3
Resolution: | Keywords:
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 Iceland_jack):
{{{#!hs
pattern II :: Int -> Int#
pattern II i <- (I# -> i)
where II (I# i) = i
pattern FF :: Float -> Float#
pattern FF f <- (F# -> f)
where FF (F# f) = f
}}}
also if GHC allowed unlifted types in pattern synonyms, should that be a
ticket?
{{{
tImB.hs:6:22-25: error: …
• Expecting a lifted type, but ‘Int#’ is unlifted
• In the type ‘Int#’
tImB.hs:10:22-27: error: …
• Expecting a lifted type, but ‘Float#’ is unlifted
• In the type ‘Float#’
Compilation failed.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12001#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list