Combinators for working with sums http://github.com/ekmett/either/

LTS Haskell 9.14:
Stackage Nightly 2017-11-24:
Latest on Hackage:5
BSD3 licensed by Edward A. Kmett
Maintained by Edward A. Kmett

Module documentation for


Hackage Build Status

This provides an Either monad transformer that unlike ErrorT is unencumbered by a constraint on its Left hand argument. This is needed for a number of applications of this monad transformer, notably in recursion-schemes.

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.

-Edward Kmett


5 - Changed the semantics of the Validation Alt and Alternative instances to collect errors. The previous implementation did not correctly abide the laws. Added vap, for when users want validation like semantics but don't want to convert back and forth to validation all the time. Similarly, added ealt to give either's Alt semantics to validation. * Dropped the deprecated Control.Monad.Trans.Either. Use Control.Monad.Trans.Except from transformers and/or transformers-compat instead.


  • Add MMonad instance for EitherT
  • Deprecate Control.Monad.Trans.Either in favor of Control.Monad.Trans.Except
  • Add firstEitherT

  • Fixed building on newer GHCs. (type synonyms require explicit foralls for unused variables these days)


  • transformers 0.5 support
  • Documentation fixes


  • Support mmorph

  • Support MonadRandom 0.4


  • Support bifunctors 5, profunctors 5, and semigroupoids 5.

  • Fixed and enhanced documentation for eitherToError.

  • Support exceptions 0.8

  • Support exceptions 0.7


  • Added eitherToError.

  • Support monad-control 1.0


  • Added Validation.

  • Updated MonadRandom support.

  • Fixed import of MonadCatch to support versions of base before 4.6


  • Inverted dependency between free and either.


  • Added instances for MonadThrow, MonadCatch.


  • Added instances for MonadBase, MonadBaseControl, and MonadTransControl.


  • Updated dependencies.


  • Added 'Data.Either.Combinators'.


  • Trustworthy despite UndecidableInstances


  • Delegate fail to the underlying Monad, rather than error.


  • Inverted roles between Semigroup and Alt. This let us write Alternative and MonadPlus instances that are compatible.
  • Removed the Functor constraint on most instances in exchange for incurring a Monad constraint on Traversable. EitherT is after all, a Monad transformer first and foremost.


  • Changed the Semigroup to use a Semigroup to combine Left branches. Left Alt untouched, so you can mix and match.


  • Added instances for mtl classes and MonadRandom.
  • The meaning of mapEitherT has changed to match mapErrorT in the mtl. The old mapEitherT is now bimapEitherT.


  • Started CHANGELOG
Used by 184 packages:
airship, amby, aws-kinesis-reshard, backtracking-exceptions, bitcoin-payment-channel, blockchain, brittany, butcher, cabal-bounds, cabal-cargs, cabal-lenses, category-extras, catnplus, cgrep, citation-resolve, cj-token, cli-builder, codex, conduit-find, configifier, consul-haskell, control-invariants, convert, coroutine-object, cparsing, cryptsy-api, CSPM-Frontend, dash-haskell, database-migrate, debian, dixi, drifter-postgresql, DSH, dsh-sql, dynamic-graph, easy-api, emailparse, engine-io, engine-io-wai, error-continuations, ethereum-client-haskell, exference, fficxx, ffmpeg-light, filediff, find-conduit, fixie, flamingra, fn-extra, formura, gelatin-freetype2, gelatin-gl, gelatin-sdl2, glabrous, glambda, growler, happstack-heist, haskell-kubernetes, haskellscript, haskoin, haskoin-core, haskoin-node, haskoin-util, hasql, hasql-backend, hasql-postgres, haste-compiler, hcltest, hedis-simple, hexpr, h-gpgme, hipbot, hipchat-hs, hledger-api, hnetcdf, hoggl, hoist-error, hoodle-core, hoodle-extra, hoodle-parser, hsoz, hs-snowtify, http-client-session, ical, imap, indieweb-algorithms, infernu, interruptible, jose-jwt, karps, katip, laika, language-qux, lens-prelude, librato, list-t-attoparsec, list-t-html-parser, list-t-libcurl, lxd-client, magicbane, marquise, mathblog, medium-sdk-haskell, melody, microformats2-parser, model, monad-journal, mtgoxapi, mustache, nomyx-api, oauthenticated, obd, objective, octohat, oculus, open-signals, optparse-simple, orchestrate, ot, pb-next, penny, pg-recorder, pianola, ping-wrapper, pivotal-tracker, playlists-http, postgresql-query, postgresql-simple-opts, postgrest, postgrest-ws, pregame, presto-hdbc, project-m36, psc-ide, qr-imager, quickcheck-property-monad, Quickson, quickwebapp, rebase, references, replicant, restricted-workers, riff, Saturnin, sdr, servant-ede, servant-examples, servant-haxl-client, servant-snap, simple-conduit, slack, snaplet-sqlite-simple-jwt-auth, snaplet-wordpress, snowtify, socketson, stack, stackage-cli, stratux-http, stratux-websockets, syncthing-hs, system-lifted, system-util, t3-server, tasty-integrate, themoviedb, themplate, thumbnail-plus, tibetan-utils, transformers-convert, ttask, twfy-api-client, typerbole, validate-input, verify, vigilance, vimeta, WaveFront, webcrank, xcffib, yahoo-finance-api, yarn-lock, yesod-auth-ldap-native, yesod-crud-persist, zm
comments powered byDisqus