HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulebase-compat-0.14.1Haskell2010

Data.Functor.Sum.Compat

  • 1 type
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

Instances20Generic1, Functor, Foldable, Traversable, Foldable1, Eq1, …