[GHC] #5144: Pattern synonyms
GHC
ghc-devs at haskell.org
Thu Aug 22 11:00:28 UTC 2013
#5144: Pattern synonyms
-------------------------------------+------------------------------------
Reporter: simonpj | Owner: cactus
Type: feature request | Status: new
Priority: normal | Milestone: _|_
Component: Compiler | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by cactus):
If your question is whether there's a syntactic way to see if a given
pattern synonym import can be used as an expression, then no, not at the
moment. So if you do something like
{{{
import M(pattern P)
x = P
}}}
then the only error you will get if `P` is not bidirectional is from the
type checker:
{{{
/tmp/hs/M2.hs:5:5:
P used in an expression, but it's a non-bidirectional pattern synonym
In the expression: P
In an equation for ‛x’: x = P
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5144#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list