Disclipline for re-use: Slim instances

Henning Thielemann lemming at henning-thielemann.de
Wed Sep 6 05:24:59 EDT 2006


On Tue, 5 Sep 2006 kahl at cas.mcmaster.ca wrote:

>            *********************************************
>            * All instance declarations should be slim. *
>            *********************************************
> I.e.:
> 
>  * Instance declarations (and default definitions)
>    should never contain non-trivial function definitions.
> 
>  * Instance declarations (and default definitions)
>    should only provide ``plumbing'' to make existing functions
>    accessible via the type class resolution mechanism.
> 
>  * The ``plumbed'' functions should always be exported
>    (since instances are always exported).

I endorse that suggestion.

What about adding some note on the Wiki's Style section?


More information about the Libraries mailing list