Add DList to base
Ivan Lazar Miljenovic
ivan.miljenovic at gmail.com
Fri Jun 9 04:58:24 UTC 2017
On 9 June 2017 at 14:15, Tony Morris <tmorris at tmorris.net> wrote:
> Yeah, those are in lens, so I am less concerned that they don't appear in
> base. Specifically, if DList were not to exist in base, and I use the
> typeclasses that we all know as well as lens, what am I missing out on?
>From a brief skim through the DList module documentation, those are
the only functions defined that do not have direct analogues in
existing typeclasses in base.
>
> On Fri, Jun 9, 2017 at 10:30 AM, Ivan Lazar Miljenovic
> <ivan.miljenovic at gmail.com> wrote:
>>
>> On 9 June 2017 at 09:41, Tony Morris <tmorris at tmorris.net> wrote:
>> > Are there any DList specific functions, that are not provided by
>> > existing
>> > type-classes (such as Foldable), that are typically used? I can think of
>> > a
>> > few, but they are all in lens.
>>
>> singleton, cons, snoc
>>
>> Though if you have singleton (which can be obtained from either Endo
>> or GHC.Ext.IsList.fromList and `(:[])`; alternatively you could use
>> pure/return but that is less pleasant IMO than the singleton function
>> for code legibility purposes) and mappend you can do cons and snoc.
>>
>> >
>> > On Tue, Jun 6, 2017 at 4:24 PM, Henning Thielemann
>> > <lemming at henning-thielemann.de> wrote:
>> >>
>> >>
>> >> On Mon, 5 Jun 2017, David Feuer wrote:
>> >>
>> >>> DList x just doesn't have much more to offer than Endo [x]. We already
>> >>> have Endo; ergo, we don't need DList.
>> >>
>> >>
>> >> I admit that I already used Endo as a quickly available DList
>> >> replacement.
>> >>
>> >> _______________________________________________
>> >> Libraries mailing list
>> >> Libraries at haskell.org
>> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>> >
>> >
>> >
>> > _______________________________________________
>> > Libraries mailing list
>> > Libraries at haskell.org
>> > http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>> >
>>
>>
>>
>> --
>> Ivan Lazar Miljenovic
>> Ivan.Miljenovic at gmail.com
>> http://IvanMiljenovic.wordpress.com
>
>
--
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com
More information about the Libraries
mailing list