packages feed

validation-1.1.2: validation.cabal

name:               validation
version:            1.1.2
license:            BSD3
license-file:       LICENCE
author:             Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>
maintainer:         Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>, Queensland Functional Programming Lab <oᴉ˙ldɟb@llǝʞsɐɥ>
copyright:          Copyright (C) 2010-2013 Tony Morris, Nick Partridge
                    Copyright (C) 2014,2015 NICTA Limited
                    Copyright (c) 2016-2019, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230.
synopsis:           A data-type like Either but with an accumulating Applicative
category:           Data
description:
  <<https://raw.githubusercontent.com/qfpl/assets/master/data61-transparent-bg.png>>
  .
  A data-type like Either but with differing properties and type-class
  instances.
  .
  Library support is provided for this different representation, include
  `lens`-related functions for converting between each and abstracting over their
  similarities.
  .
  * `Validation`
  .
  The `Validation` data type is isomorphic to `Either`, but has an instance
  of `Applicative` that accumulates on the error side. That is to say, if two
  (or more) errors are encountered, they are appended using a `Semigroup`
  operation.
  .
  As a consequence of this `Applicative` instance, there is no corresponding
  `Bind` or `Monad` instance. `Validation` is an example of, "An applicative
  functor that is not a monad."

homepage:           https://github.com/qfpl/validation
bug-reports:        https://github.com/qfpl/validation/issues
cabal-version:      >= 1.10
build-type:         Simple
extra-source-files: changelog
tested-with:        GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3

source-repository   head
  type:             git
  location:         git@github.com:qfpl/validation.git

library
  default-language:
                    Haskell2010

  build-depends:
                      base          >= 4.8  && < 5
                    , assoc         >= 1    && < 1.1
                    , deepseq       >= 1.4  && < 1.5
                    , semigroups    >= 0.16 && < 1
                    , semigroupoids >= 5    && < 6
                    , bifunctors    >= 5.5  && < 6
                    , lens          >= 4    && < 6

  ghc-options:
                    -Wall

  hs-source-dirs:
                    src

  exposed-modules:
                    Data.Validation

test-suite hedgehog
  type:
                    exitcode-stdio-1.0

  main-is:
                    hedgehog_tests.hs

  default-language:
                    Haskell2010

  build-depends:
                      base       >= 4.8  && < 5
                    , hedgehog   >= 0.5  && < 1.1
                    , semigroups >= 0.16 && < 1
                    , validation

  ghc-options:
                    -Wall
                    -threaded

  hs-source-dirs:
                    test

test-suite hunit
  type:
                    exitcode-stdio-1.0

  main-is:
                    hunit_tests.hs

  default-language:
                    Haskell2010

  build-depends:
                      base       >= 4.8  && < 5
                    , HUnit      >= 1.5  && < 1.7
                    , lens       >= 4    && < 5
                    , semigroups >= 0.16 && < 1
                    , validation

  ghc-options:
                    -Wall
                    -threaded

  hs-source-dirs:
                    test