Error in GHC.Generics documentation
The Generic instance shown as automatically derived for the Tree type should read
instance Generic (Tree a) where
type Rep (Tree a) =
D1 ('MetaData "Tree" "Main" "package-name" 'False)
(C1 ('MetaCons "Leaf" 'PrefixI 'False)
(S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
(Rec0 a)) :+:
C1 ('MetaCons "Leaf" 'PrefixI 'False)
(S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
(Rec0 (Tree a)) :*:
S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
(Rec0 (Tree a)))))
from (Leaf f) = M1 (L1 (M1 (M1 (K1 f))))
from (Node f g) = M1 (R1 (M1 ((M1 (K1 f)) :*: (M1 (K1 g)))))
to (M1 (L1 (M1 (M1 (K1 f))))) = Leaf f
to (M1 (R1 (M1 ((M1 (K1 f)) :*: (M1 (K1 g)))))) = Node f g
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |