[Haskell-cafe] Prelude's documentation on Hackage incomplete?

Benjamin Rickels benjamin.rickels at gmail.com
Fri Jul 7 18:58:35 UTC 2017


I was recently looking at the various functions the RealFrac
<http://web.archive.org/web/20170702220651/https://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#t:RealFrac>
type class provides and noticed, that Double
<http://web.archive.org/web/20170702220651/https://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#t:Double>
isn't listed as an instance of it; and neither are Num, Real and Fractional
mentioned as implemented instances in the documentation for Double.
Now, somebody who is familiar with the hierarchy of the numeric type
classes could of course rather easily deduct, that, since Double is an
instance of RealFloat (this is mentioned in the documentation on Hackage),
it is also required to implement all of the above. And (surely enough)
the Haskell
98 Report
<https://webcache.googleusercontent.com/search?q=cache:GKdvwWYGFLoJ:https://www.haskell.org/onlinereport/standard-prelude.html+&cd=2&hl=en&ct=clnk&gl=de>
lists
all the relevant implementations and so does a quick *:info Double* in GHCi.
However I'd (assume and thus) argue, that most beginners who google (or
especially hoogle) anything about Haskell, are often directed to the
Hackage documentation itself - and any missing information there could lead
to quite a bit of a headache; even more so, if this concerns something as
important as the Prelude.
Therefore I'd like to ask, whether this is a known issue and independently
propose, that (in the meantime) an official recommendation somewhere to do
a quick *:info <type class>* or :info *<type> *in GHCi yourself, as to find
out, which type class instances are currently available, might help to
alleviate some confusion.

Benjamin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170707/1d360a4a/attachment.html>


More information about the Haskell-Cafe mailing list