[GHC] #13206: Error in GHC.Generics documentation

#13206: Error in GHC.Generics documentation -------------------------------------+------------------------------------- Reporter: dsf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 8.0.1 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13206 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13206: Error in GHC.Generics documentation -------------------------------------+------------------------------------- Reporter: dsf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dsf): I mean {{{ 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 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13206#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13206: Error in GHC.Generics documentation -------------------------------------+------------------------------------- Reporter: dsf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Generics Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * keywords: => Generics Comment: Forgive me for being slow, but which specific lines in the current `GHC.Generics` source code are wrong? And what in particular do you wish to change? It's hard to discern from all the autogenerated noise. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13206#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13206: Error in GHC.Generics documentation -------------------------------------+------------------------------------- Reporter: dsf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Generics Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dsf): If you go to https://hackage.haskell.org/package/base-4.9.1.0/docs/GHC- Generics.html it is the second block of code. It is near the top of http://git.haskell.org/ghc.git/blob_plain/HEAD:/libraries/base/GHC/Generics.... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13206#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13206: Error in GHC.Generics documentation -------------------------------------+------------------------------------- Reporter: dsf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Generics Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): dsf, I presume you're referring to this? http://git.haskell.org/ghc.git/blob/4441f90738e27ea7ba368723f27d19c03093aa66... Granted, my eyes aren't as sharp as they used to be, but from a glance, that `Rep (Tree a)` instances appears to be the same as yours. So can you point to the specific part that you claim is incorrect? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13206#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13206: Error in GHC.Generics documentation -------------------------------------+------------------------------------- Reporter: dsf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Generics Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dsf): It turns out its just this: {{{ --- old 2017-01-29 21:28:30.598988361 -0800 +++ new 2017-01-29 21:28:46.650987621 -0800 @@ -2,7 +2,7 @@ type Rep (Tree a) = D1 ('MetaData "Tree" "Main" "package-name" 'False) (C1 ('MetaCons "Leaf" 'PrefixI 'False) - (S1 '(MetaSel 'Nothing + (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13206#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13206: Error in GHC.Generics documentation
-------------------------------------+-------------------------------------
Reporter: dsf | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 8.0.1
Resolution: | Keywords: Generics
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott

#13206: Error in GHC.Generics documentation -------------------------------------+------------------------------------- Reporter: dsf | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: libraries/base | Version: 8.0.1 Resolution: fixed | Keywords: Generics Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => fixed * milestone: => 8.2.1 Comment: Ah, sharp eye! Thanks for the catch, I've since applied your fix in HEAD. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13206#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC