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

GHC ghc-devs at haskell.org
Mon Jan 30 01:21:26 UTC 2017


#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


More information about the ghc-tickets mailing list