[GHC] #11314: Documentation on const function is wrong

GHC ghc-devs at haskell.org
Tue Dec 29 19:39:56 UTC 2015


#11314: Documentation on const function is wrong
-------------------------------------+-------------------------------------
           Reporter:  milleniumbug   |             Owner:
               Type:  bug            |            Status:  new
           Priority:  low            |         Milestone:
          Component:                 |           Version:  7.10.3
  libraries/base                     |
           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:
-------------------------------------+-------------------------------------
 It currently only says

     Constant function

 which is not only not informative (how am I supposed to use this function,
 some API examples would be nice), but actually wrong (`const` is not a
 constant function, `const x` is)

 I suggest the following wording instead:

     Returns a unary constant function (a function that returns the same
 value for all inputs) from the argument @a at .

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


More information about the ghc-tickets mailing list