[Haskell-cafe] Type Constraints on Data Constructors

Guy guytsalmaves-h at yahoo.com
Thu Jun 9 16:31:30 CEST 2011


Malcolm Wallace <malcolm.wallace <at> me.com> writes:

> The class context on the data constructor buys you nothing extra in terms of
expressivity in the language. 
> All it does is force you to repeat the context on every function that uses the
datatype.  For this reason, the
> language committee has decided that the feature will be removed in the next
revision of Haskell.
> 
> Regards,
>     Malcolm

Why not infer class contexts from type or data constructors, instead of ignoring
them?

Having to repeatedly state redundant type information is not a desirable state
of affairs.




More information about the Haskell-Cafe mailing list