Add Zero and One to Data.Functor (mirroring V1, U1)

Eric Mertens emertens at gmail.com
Thu Jan 26 17:40:24 UTC 2017


Hi everyone,

I don't think it's obvious why these type need to be in the base package
itself. It makes sense that the GHC.Generics types are in base because GHC
needs access to them to derive Generic. We already have Proxy in base. The
trivia package was released in 2014 but no other package has needed that
functionality enough to depend on it. What problem is being solved?

I think the types provided by packages like transformers are more important
to general Haskell programming, and I'm quite happy to have those types in
a separate package.

Best regards,
Eric Mertens

On Tue, Jan 24, 2017 at 11:18 AM Baldur Blöndal <baldurpet at gmail.com> wrote:

> Deadline of 2 weeks.
>
> Original discussion: ⁽¹⁾
>
> data Zero a
> data One  a = One
>
> Same definitions as in ‘trivia’ package,⁽²⁾
> if a consensus is reached we can update
> the documentation for Free:⁽³⁾
>
> “Free Zero” is isomorphic to Identity.
> “Free One” is isomorphic to Maybe.
>
> ⁽¹⁾ https://ghc.haskell.org/trac/ghc/ticket/13177
> ⁽²⁾ https://hackage.haskell.org/package/trivia
> ⁽³⁾
> https://hackage.haskell.org/package/free-4.12.4/docs/Control-Monad-Free.html
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170126/3bf042a8/attachment.html>


More information about the Libraries mailing list