[GHC] #14184: Examples with language extensions

GHC ghc-devs at haskell.org
Sun Sep 3 18:57:01 UTC 2017


#14184: Examples with language extensions
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Documentation  |           Version:  8.2.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Are we okay with examples in the GHC user guide uses language extensions?

 The documentation has [https://downloads.haskell.org/~ghc/master/users-
 guide/glasgow_exts.html#record-constructors this code]

 {{{#!hs
 inc :: Counter a -> Counter a
 inc (NewCounter x i d t) = NewCounter
     { _this = i x, _inc = i, _display = d, tag = t }
 }}}

 which could be written

 {{{#!hs
 inc :: Counter a -> Counter a
 inc NewCounter{..} = NewCounter{ _this = _inc _this, .. }
 }}}

 if we're okay with that tradeoff.

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


More information about the ghc-tickets mailing list