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

Modulebase-compat-batteries-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, …