{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:hackage/railroad","name":"railroad","description":"Railway-oriented error handling for Haskell: one short operator per\nstep, and the failure paths stop taking up lines.\n\nEach operator looks at a result (Maybe, Either, Bool,\nValidation, or a collection of them), decides whether it is a failure,\nand says what to do about it. Where you would write\n\nyou write\n\nLayers are unwrapped left to right: ? err503 unwraps the database\nEither, then ?! demands exactly one row (none is a 404, several a 500).\n\nWhat to do about a failure:\n\nThrow: ? (constant error) and ?? (error computed from the failure).\n\nRecover: ?~ and ??~.\n\nObserve, then carry on: ?\u003c*, as in runQuery q ?\u003c* logDbError ? err503.\n\nFall back to another source: ?|, or ?|\u003c\u003e to combine the errors.\n\nWhat counts as a failure:\n\nNothing, Left, False and Failure. A collection fails if any\n  element does, so an empty collection passes. Validation failures\n  accumulate, so a whole request can report every problem at once.\n\nCollections are also checked by size: ?+ (at least one), ?! (exactly\n  one), ?∅ (none), and ?∃ (at least one element succeeded; keeps the\n  successes).\n\nClassifiers: ?\u003e tags by a predicate. Any function into Either,\n  Maybe, Bool or Validation is a classifier, applied with \u003c\u0026\u003e.\n  Railroad.Bifurcate provides neg, atLeastOne, exactlyOne,\n  noneAtAll and anySucceeds.\n\nWorks in any MonadError (Railroad.MonadError: mtl, ExceptT,\nservant's Handler) and in effectful with the Error effect\n(Railroad). All operators are infixl 1 like \u003e\u003e= and \u003c\u0026\u003e, so\nthey chain without parentheses. The readme has more examples.","version":"0.3.0.0","softwareVersion":"0.3.0.0","license":"https://spdx.org/licenses/BSD-3-Clause","codeRepository":"https://github.com/mastratisi/railroad","issueTracker":"https://github.com/mastratisi/railroad/issues","url":"https://github.com/mastratisi/railroad","keywords":["bsd3","control","error-handling","library","Propose Tags"],"programmingLanguage":{"@type":"ComputerLanguage","name":"Haskell"},"maintainer":[{"@type":"Person","name":"mastratisi"}],"author":[{"@type":"Person","name":"mastratisi"}],"copyrightHolder":[{"@type":"Person","name":"mastratisi"}],"dateCreated":"2026-02-26","dateModified":"2026-10-13","datePublished":"2026-10-13","copyrightYear":2026,"downloadUrl":"https://hackage.haskell.org/package/railroad-0.3.0.0/railroad-0.3.0.0.tar.gz","applicationCategory":"hackage","runtimePlatform":"hackage","developmentStatus":"active","sameAs":["https://hackage.haskell.org/package/railroad"],"https://www.w3.org/ns/activitystreams#likes":7}