[Haskell-cafe] User guide for DeriveAnyClass
Ivan Lazar Miljenovic
ivan.miljenovic at gmail.com
Fri Nov 6 09:08:57 UTC 2015
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
More information about the Haskell-Cafe
mailing list