[GHC] #11987: Allow record wildcards with pattern synonyms

GHC ghc-devs at haskell.org
Tue Apr 26 21:34:20 UTC 2016


#11987: Allow record wildcards with pattern synonyms
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.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:
-------------------------------------+-------------------------------------
 With pattern synonym `pattern Point {x, y} = (x, y)` we can write

 {{{
 >>> let { x = 1; y = 2 } in Point { x = x, y = y }
 (1, 2)
 }}}
 {{{
 >>> let { x = 1; y = 2 } in Point { x, y }
 (1, 2)
 }}}

 but record wildcards ain't workin

 {{{#!hs
 >>> let { x = 1; y = 2 } in Point {..}
 <interactive>:342:25-36: error:
     Pattern synonym ‘Point’ used as a data constructor
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11987>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list