[Haskell-cafe] Taking over `data-default-*`

Christopher Allen cma at bitemyapp.com
Tue May 8 09:38:41 UTC 2018


No, it doesn't, because if someone actually meant the monoidal
identity then they would've asked for it. `Default` serves no purpose,
it is useless. This is an attempt at ex post facto justification for
abusing type classes to avoid importing a value.

On Tue, May 8, 2018 at 4:32 AM, Manuel Gómez <targen at gmail.com> wrote:
> Does it make sense to consider stating a law for Default?  e.g. if (Monoid
> t, Default t) then def = mempty
>
> On Tue, May 8, 2018 at 11:22 AM Chris Wong <lambda.fairy at gmail.com> wrote:
>>
>> On Tue, May 8, 2018 at 9:10 PM, Marco Zocca <zocca.marco at gmail.com> wrote:
>>>
>>> data-default alone is depended on by > 500 packages :
>>> http://packdeps.haskellers.com/reverse/data-default
>>>
>>> Could you motivate why it's not a good idea ?
>>>
>>
>> I can think of two reasons:
>>
>> - It has no laws, so there's formal specification that tells us whether an
>> instance is "correct" or not.
>>
>> - Type classes are useful when there is a large family of generic
>> operations that can work with them. For example, the utility functions in
>> Control.Monad [1] are used in all kinds of Haskell programs. But there are
>> no such generic operations that apply to all Default instances.
>>
>> That said -- as you note, it's has quite a few dependents so it's great
>> that someone is stepping up to maintain it regardless.
>>
>> Chris
>>
>> [1]
>> https://hackage.haskell.org/package/base-4.11.1.0/docs/Control-Monad.html#g:4
>>
>>>
>>>
>>> On Tue, May 8, 2018 at 11:02 AM, Christopher Allen <cma at bitemyapp.com>
>>> wrote:
>>> > Is this something folks still think is a good idea? I purge
>>> > Data.Default from projects I work on.
>>> >
>>> > On Tue, May 8, 2018 at 3:58 AM, Marco Zocca <zocca.marco at gmail.com>
>>> > wrote:
>>> >> Dear all,
>>> >>
>>> >>   I've been increasingly relying on data-default-class, but sadly it
>>> >> doesn't look like it's currently maintained; there are some tickets on
>>> >> the github issue tracker that would need some attention.
>>> >>
>>> >> I have tried contacting the authro/current maintainer Lukas Mai (CC'd)
>>> >> by email but have not received an answer so far (I hope he's doing
>>> >> well, btw).
>>> >>
>>> >> This is my first public request for taking over the `data-default`
>>> >> family of packages:
>>> >>
>>> >> data-default-class
>>> >> data-default-instances-base
>>> >> data-default-instances-containers
>>> >> data-default-instances-dlist
>>> >> data-default-instances-old-locale
>>> >> data-default
>>> >>
>>> >> Kind regards,
>>> >> Marco Zocca
>>> >> (http://hackage.haskell.org/user/ocramz)
>>> >> _______________________________________________
>>> >> Libraries mailing list
>>> >> Libraries at haskell.org
>>> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>> >
>>> >
>>> >
>>> > --
>>> > Chris Allen
>>> > Currently working on http://haskellbook.com
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> To (un)subscribe, modify options or view archives go to:
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>> Only members subscribed via the mailman list are allowed to post.
>>
>>
>>
>>
>> --
>> Chris Wong (https://lambda.xyz)
>>
>> "I had not the vaguest idea what this meant and when I could not remember
>> the words, my tutor threw the book at my head, which did not stimulate my
>> intellect in any way." -- Bertrand Russell
>> _______________________________________________
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>> Only members subscribed via the mailman list are allowed to post.
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



-- 
Chris Allen
Currently working on http://haskellbook.com


More information about the Haskell-Cafe mailing list