aeson and dlist in HP 2013.4.0.0
Don Stewart
dons00 at gmail.com
Tue Nov 26 13:30:08 UTC 2013
Indeed, avoiding expensive instances was part of the design
On Nov 18, 2013 5:21 PM, "Joachim Breitner" <mail at joachim-breitner.de>
wrote:
> Hi,
>
> Am Montag, den 18.11.2013, 10:04 +0200 schrieb Sean Leather:
> > * Maintenance and development taken over by Sean Leather
> > * Migrate repository from http://code.haskell.org/~dons/code/dlist/ to
> > https://github.com/spl/dlist
> > * Add `Eq`, `Ord`, `Read`, `Show`, `Alternative`, `Foldable`,
> `Traversable`
> > instances
>
> Given that the point of dlist is to speed up code where lists are
> insufficient, would it make sense to only provide those instances that
> can be implemented without converting to and from lists?
>
> If there are instances that cannot be implemented idiomatically with
> dlists, maybe they should be left out, to signal the user that he will
> not get the benefits of DLists for these.
>
> In particular, it seems that the Show instance could be improved.
> Currently it says
> showsPrec p dl = showParen (p > 10) $
> showString "fromList " . shows (toList dl)
> i.e. goes via a list. But this is constructing a ShowS (which is String
> -> String) value, i.e. another difference list. Shouldn’t it be possible
> to stay in the world of difference lists when implementing this?
>
> (Or maybe I’m overly worried, and I admit that I did not run benchmarks
> so far.)
>
> Greetings,
> Joachim
>
> --
> Joachim “nomeata” Breitner
> mail at joachim-breitner.de • http://www.joachim-breitner.de/
> Jabber: nomeata at joachim-breitner.de • GPG-Key: 0x4743206C
> Debian Developer: nomeata at debian.org
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20131126/ce6d3046/attachment.html>
More information about the Libraries
mailing list