Talk:GHC.Generics

From HaskellWiki
Revision as of 04:00, 3 March 2012 by Drbb (talk | contribs) (typo?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Why does the definition of (:+:) use the pipe character "|", but the definition of (:*:) uses the ":*:" operator?


Is that a typo (copied from http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/generic-programming.html, or is there a reason for the difference?

-- | Sums: encode choice between constructors
infixr 5 :+:
data (:+:) f g p = L1 (f p) | R1 (g p)
-- | Products: encode multiple arguments to constructors
infixr 6 :*:
data (:*:) f g p = f p :*: g p