HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulerebase-1.21.2Haskell2010

Rebase.Data.Functor.Sum

  • 1 type
  • Packagerebase-1.21.2
  • Exports1
  • LanguageHaskell2010
  • LicenceMIT
  • SourceSum.hs
datadata Sum (f :: k -> Type) (g :: k -> Type) (a :: k)
#

Lifted sum of functors.

Examples
Example1 expression
fmap (+1) (InL (Just 1))  :: Sum Maybe [] IntInL (Just 2)
Example1 expression
fmap (+1) (InR [1, 2, 3]) :: Sum Maybe [] IntInR [2,3,4]

Constructors

Instances40Generic1, FoldableWithIndex, FunctorWithIndex, TraversableWithIndex, Functor, Foldable, …