aeson and dlist in HP 2013.4.0.0
Christian.Maeder at dfki.de
Mon Nov 18 17:07:09 UTC 2013
Am 18.11.2013 17:21, schrieb Niklas Hambüchen:
> On 18/11/13 15:37, Sean Leather wrote:
>> include debugging (yours), implementing functions not included in the
>> library (e.g. this comes up sometimes with Data.Map/Data.Set), and
>> In the case of DList, the underlying type is so simple
>> that exposing it does not add enough value to warrant a second module.
> These two points you give seem very contradicting.
>>From my experience, whatever it is, in the end somebody wants to give an
> instance to it.
> I would therefore vote to expose internals of *all* data types exposed.
You do not believe in abstract data types, do you?
With the constructor exposed you can spoil invariants, i.e. for DList:
wrongEmptyList = DL $ const 
toList $ append wrongEmptyList $ fromList 
> Not doing so is assuming the ability to foretell everything a user will
> ever do with it, which is never true.
> Libraries mailing list
> Libraries at haskell.org
More information about the Libraries