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

Modulestrict-0.5.1Haskell2010

Data.Strict.Either

The strict variant of the standard Haskell Either type and the corresponding variants of the functions from Data.Either.

Note that the strict Either type is not an applicative functor, and therefore also no monad. The reasons are the same as the ones for the strict Maybe type, which are explained in Data.Maybe.Strict.

  • 1 type
  • 8 values
  • Packagestrict-0.5.1
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceEither.hs
datadata Either a b
#

The strict choice type.

Constructors

Instances34Bifoldable, Bifunctor, Bitraversable, Eq2, Ord2, Read2, …
valueeither :: (a -> c) -> (b -> c) -> Either a b -> c
#

Case analysis: if the value is Left a, apply the first function to a; if it is Right b, apply the second function to b.

valuefromLeft :: Either a b -> a
#

Extracts the element out of a Left and throws an error if the argument is a Right.