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@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.