Data.Fixed.Fixed constructor

Yitzchak Gale gale at sefer.org
Sun Jul 26 07:54:35 EDT 2009


David Menendez wrote:
>> Out of curiosity, what made you decide to expose the constructor?

Ashley Yakeley wrote:
> Since I am providing a Data instance, I might as well
> provide the MkFixed constructor.

So what? Most of the time the Data instance won't be used.

Please don't do this, unless you think there might be
a real use case.

People want to be able to look at the haddocks/export list
and see at a glance how to write neat, bullet-proof code.
If someone uses the Data instance, they should be aware
of the risks. But if you expose the constructor, it will
cause average users of this module to do the wrong thing
sometimes.

Thanks,
Yitz


More information about the Libraries mailing list