[Haskell-cafe] Haskell reference documentation, laws first or laws last?

David Feuer david.feuer at gmail.com
Fri Sep 17 01:33:02 UTC 2021


The laws of any sensible class are an essential and integral part of it.
Without them, you just have ad hoc overloading. They shouldn't be relegated
to the canonical exporting module.

On Thu, Sep 16, 2021, 9:27 PM Viktor Dukhovni <ietf-dane at dukhovni.org>
wrote:

> On Thu, Sep 16, 2021 at 09:14:19PM -0400, David Feuer wrote:
>
> > I'm not talking about whether they're first or last. They're currently
> not
> > part of the class documentation *at all*. They're only in the
> > Data.Traversable documentation.
>
> I see, I think you're noting that when re-exported from Prelude, the
> class definitions of Foldable and Traversable that appear in the
> Prelude module:
>
>
> https://hackage.haskell.org/package/base-4.15.0.0/docs/Prelude.html#g:11
>
> no longer include the laws, you have to look at the underlying module
> to find them.  If that's the issue, I should note that the re-exported
> class definitions do have overview hyperlinks:
>
>     A more detailed description can be found in the overview section of
>     [Data.Foldable](
> https://hackage.haskell.org/package/base-4.15.0.0/docs/Data-Foldable.html#overview
> )
>
>     A more detailed description can be found in the overview section of
>     [Data.Traversable](
> https://hackage.haskell.org/package/base-4.15.0.0/docs/Data-Traversable.html#overview
> )
>
> Would your issue be addressed if links to the laws were similarly linked
> from the class definitions?
>
> --
>     Viktor.
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210916/8b4e884e/attachment.html>


More information about the Haskell-Cafe mailing list