[GHC] #11314: Documentation on const function is wrong
GHC
ghc-devs at haskell.org
Tue Dec 29 21:06:07 UTC 2015
#11314: Documentation on const function is wrong
-------------------------------------+-------------------------------------
Reporter: milleniumbug | Owner:
Type: bug | Status: patch
Priority: low | Milestone: 8.0.1
Component: libraries/base | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Documentation | Unknown/Multiple
bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1720
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by bgamari):
* status: new => patch
* failure: None/Unknown => Documentation bug
* differential: => Phab:D1720
* milestone: => 8.0.1
Old description:
> 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 .
New description:
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 .
--
Comment:
Indeed, this is one of many examples where our documentation is sorely
lacking. How does Phab:D1720 look?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11314#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list