{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:hackage/validation@1","name":"validation","description":"\n\nA data type like Either but with an accumulating Applicative instance.\n\nThe Validation data type is isomorphic to Either, but has an instance\nof Applicative that accumulates on the error side. That is to say, if two\n(or more) errors are encountered, they are appended using a Semigroup\noperation.\n\nAs a consequence of this Applicative instance, there is no corresponding\nBind or Monad instance. Validation is an example of, \"An applicative\nfunctor that is not a monad.\"\n\nThe library provides:\n\nClassy optics (GetValidation, HasValidation, ReviewValidation,\nAsValidation) following the conventions of makeClassy and\nmakeClassyPrisms from lens.\n\nPolymorphic prisms (__Failure, __Success) for type-changing operations.\n\nIsomorphisms to Either and (Bool, a).\n\nValidationMonadT err m a is a monad transformer wrapping m (Validation err a).\nUnlike Validation, it has short-circuiting Applicative, Bind, Monad,\nand MonadError instances.\n\nFour validator newtypes wrap a validation function with different type\nparameter orders, enabling different class instances:\n\nValidator x err a — Bifunctor, accumulating Applicative, Either-like Alt\n\nValidatorProfunctor err x a — Profunctor, accumulating Applicative\n\nValidatorMonadT x err f a — Monad, MonadTrans, BindTrans\n\nValidatorMonadProfunctorT err f x a — Profunctor, Monad, Category, Arrow\n\nAll four are isomorphic and have cross-type optics instances.\n\nValidator is the odd one out in its Alt instance. For the other three\nvalidators, \u003c!\u003e accumulates errors when both sides fail. For Validator,\n\u003c!\u003e behaves like Either: the first success wins, otherwise the second\nfailure is returned. Validator has no Plus or Alternative instance, and\nits \u003c\u003e still accumulates errors.\n\n[Index] [Quick Jump]\n\nPackage maintainers\n\nFor package maintainers and hackage trustees\n\nCandidates","version":"1","softwareVersion":"1","license":"https://spdx.org/licenses/BSD-3-Clause","codeRepository":"https://github.com/system-f/validation","issueTracker":"https://github.com/system-f/validation/issues","url":"https://github.com/system-f/validation","keywords":["bsd3","data","library","Propose Tags"],"programmingLanguage":{"@type":"ComputerLanguage","name":"Haskell"},"maintainer":[{"@type":"Person","name":"TonyMorris"},{"@type":"Person","name":"jack"},{"@type":"Person","name":"qfpl"},{"@type":"Person","name":"GeorgeWilson"}],"author":[{"@type":"Person","name":"TonyMorris"},{"@type":"Person","name":"jack"},{"@type":"Person","name":"qfpl"},{"@type":"Person","name":"GeorgeWilson"}],"copyrightHolder":[{"@type":"Person","name":"TonyMorris"},{"@type":"Person","name":"jack"},{"@type":"Person","name":"qfpl"},{"@type":"Person","name":"GeorgeWilson"}],"dateCreated":"2018-02-26","dateModified":"2022-12-05","datePublished":"2018-02-26","copyrightYear":2018,"downloadUrl":"https://hackage.haskell.org/package/validation-1/validation-1.tar.gz","applicationCategory":"hackage","runtimePlatform":"hackage","developmentStatus":"active","sameAs":["https://hackage.haskell.org/package/validation-1"],"https://www.w3.org/ns/activitystreams#likes":103,"https://forgefed.org/ns#forks":26}