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

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


#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


More information about the ghc-tickets mailing list