[Haskell-cafe] User guide for DeriveAnyClass

Kostiantyn Rybnikov k-bx at k-bx.com
Fri Nov 6 09:26:50 UTC 2015


Ah, thank you, I've seen it before but somehow couldn't find now.

On Fri, Nov 6, 2015 at 11:08 AM, Ivan Lazar Miljenovic <
ivan.miljenovic at gmail.com> wrote:

> Did you mean this link for the Users Guide?
>
> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/deriving.html#derive-any-class
>
> DeriveAny class lets you write
>
> > data Foo = ... deriving (Bar)
>
> instead of:
>
> > data Foo = ...
> > instance Bar Foo
>
> (i.e. if it's possible to make it an instance without having to
> provide explicit method implementations); as the Users Guide hints
> it's primarily useful in cases where default definitions are provided
> for you, typically using the DefaultSignatures definition with
> GHC.Generics.
>
> On 6 November 2015 at 20:01, Kostiantyn Rybnikov <k-bx at k-bx.com> wrote:
> > Is there a topic for DeriveAnyClass extension in user guide? It is
> mentioned
> > several times in different places, also I see link to it in from cabal
> > haddocs [0] into its page inside "other type extensions" [1], but it
> leads
> > nowhere.
> >
> > Thank you.
> >
> > [0]:
> >
> https://www.haskell.org/cabal/release/cabal-latest/doc/API/Cabal/Language-Haskell-Extension.html
> > [1]:
> >
> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/other-type-extensions.html#derive-any-class
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> >
>
>
>
> --
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.com
> http://IvanMiljenovic.wordpress.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151106/838f7609/attachment.html>


More information about the Haskell-Cafe mailing list