name:               validation
version:            0.6.0
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:          Copyright (C) 2014,2015 NICTA Limited
copyright:          Copyright (c) 2016,2017, 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:
  <<http://i.imgur.com/uZnp9ke.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.
  .
  * `AccValidation`
  .
  The `AccValidation` 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. `AccValidation` 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:         Custom
extra-source-files: changelog
tested-with:        GHC==8.2.1, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4

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

flag                small_base
  description:      Choose the new, split-up base package.

custom-setup
  setup-depends:
    base          >= 4     && <5,
    Cabal         >= 1.10,
    cabal-doctest >= 1.0.1 && <1.1

library
  default-language:
                    Haskell2010

  build-depends:
                      base          >= 3   && < 5
                    , mtl           >= 2.0 && < 2.3
                    , semigroups    >= 0.8
                    , semigroupoids >= 4.0
                    , bifunctors    >= 3.0
                    , lens          >= 4.0 && < 5
                    , transformers  >= 0.3 && < 0.6

  ghc-options:
                    -Wall

  default-extensions:
                    NoImplicitPrelude

  hs-source-dirs:
                    src

  exposed-modules:
                    Data.Validation

test-suite doctests
  type:
                    exitcode-stdio-1.0

  main-is:
                    doctests.hs

  default-language:
                    Haskell2010

  build-depends:
                      base < 5 && >= 3
                    -- https://github.com/phadej/cabal-doctest/issues/19
                    , cabal-doctest >= 1.0.1 && <1.1
                    , doctest >= 0.9.7
                    , filepath >= 1.3
                    , directory >= 1.1
                    , QuickCheck >= 2.0
                    , template-haskell >= 2.8

  ghc-options:
                    -Wall
                    -threaded

  hs-source-dirs:
                    test