[GHC] #14112: bang patterns on pattern synonyms? (left vs right hand sides)
GHC
ghc-devs at haskell.org
Mon Aug 28 14:00:32 UTC 2017
#14112: bang patterns on pattern synonyms? (left vs right hand sides)
-------------------------------------+-------------------------------------
Reporter: carter | Owner: RyanGlScott
Type: bug | Status: new
Priority: normal | Milestone: 8.4.1
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: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* owner: (none) => RyanGlScott
* milestone: => 8.4.1
Comment:
The only reason I don't favor (B) is because it's not always clear how
you'd translate bang patterns on the RHS of an implicitly bidirectional
pattern synonym to bang patterns for the builder arguments. For example,
how would this be desugared?
{{{#!hs
pattern Foo a = Just !(Just a)
}}}
The only sensible thing I could envision here would be to silently ignore
the bang pattern, but that makes me just as uncomfortable as it does you.
I'd be willing to implement option (A).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14112#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list