Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

MINIMAL complete definitions should not take DefaultSignatures into account #1515

Open
andreasabel opened this issue Jul 26, 2022 · 0 comments

Comments

@andreasabel
Copy link
Member

A default signature in general does not alleviate the user from implementing the corresponding method in instances. They only apply to special situations. Thus, they should not be taken into account when computing the MINIMAL complete definition.

E.g., in https://hackage.haskell.org/package/equivalence-0.4.0.1/docs/Data-Equivalence-Monad.html#t:MonadEquiv the "Minimal complete definition" is stated to be Nothing because every method has a default signature or a conventional default implementation. However, this statement is wrong in the sense that a naked instance will lead to broken code in all cases.

If I think about it, it is probably best to never try to compute the minimal complete definition automatically, but only verbalize the contents of the MINIMAL pragma when it is given.

Screenshot 2022-07-26 at 14 45 37

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant