
26 Jul
2009
26 Jul
'09
7:54 a.m.
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