[Haskell] [ANNOUNCE] network-address-0.2.0
conrad at metadecks.org
Thu Sep 8 05:02:52 CEST 2011
On 8 September 2011 10:35, Ivan Lazar Miljenovic
<ivan.miljenovic at gmail.com> wrote:
> On 8 September 2011 12:19, Conrad Parker <conrad at metadecks.org> wrote:
>> given that readAddress can parse the output of showAddress, and
>> readSubnet can parse the output of showSubnet, is there any reason not
>> to use these for the implementation of Show and Read instances?
> My guess is that since showAddress and readsAddress are class-based,
> there might be some defaulting issues if you use them.
well, then remove them from the class interface and just use the Read
and Show classes ...
> Also, unless
> the constructor isn't exported, isn't it usually preferable to have
> Show and Read instances produce/use actual values directly?
sure, but the roundtripping seems fairly unambiguous here.
More information about the Haskell