git.iko.soy/typeable/validationt
on master help sign in
5 files changed+25−16
since splitsnapshots
unifiedsplit
.travis.yml+4−4 README.md+2−1 src/Control/Monad/Validation.hs+5−2 stack.yaml+1−1 validationt.cabal+13−8
.travis.yml+4−4
@@ -12,12 +12,12 @@ cache:
1212
1313jobs:
1414 include:
15+ - ghc: 8.10.2
16+ env: SNAPSHOT="nightly-2020-11-03"
17+ - ghc: 8.8.4
18+ env: SNAPSHOT="lts-16.20"
1519 - ghc: 8.6.5
1620 env: SNAPSHOT="lts-14.22"
17− - ghc: 8.6.4
18− env: SNAPSHOT="lts-13.19"
19− - ghc: 8.6.3
20− env: SNAPSHOT="lts-13.11"
2121 - ghc: 8.4.4
2222 env: SNAPSHOT="lts-12.26"
2323
README.md+2−1
@@ -2,7 +2,8 @@
22
33# ValidationT
44
5−A very small validation data library.
5+A simple data validation library. The main idea is to provide an easy way to
6+validate web form data by aggregating errors for each field.
67
78## Usage
89
src/Control/Monad/Validation.hs+5−2
@@ -38,11 +38,14 @@ import Data.Foldable as F
3838import Data.Functor
3939import Data.List as L
4040import Data.Map.Strict as M
41−import Data.Monoid
4241import Data.Text as T
4342import Data.Vector as V
4443import Test.QuickCheck
4544
45+#if MIN_VERSION_mtl(2,3,0)
46+import Control.Monad
47+import Control.Monad.Fix
48+#endif
4649
4750-- | Collects all thrown warnings in 'StateT' and errors
4851-- in 'ExceptT' into a single value using 'Monoid'.
@@ -86,7 +89,7 @@ instance (Ord k, Semigroup v) => Semigroup (MonoidMap k v) where
8689
8790instance (Ord k, Monoid v) => Monoid (MonoidMap k v) where
8891 mempty = MonoidMap M.empty
89− mappend = mmAppend
92+ mappend = (<>)
9093
9194instance (ToJSON k, ToJSON v) => ToJSON (MonoidMap k v) where
9295 toJSON (MonoidMap m) = toJSON $ L.map toObj $ M.toList m
stack.yaml+1−1
@@ -15,7 +15,7 @@
1515# resolver:
1616# name: custom-snapshot
1717# location: "./custom-snapshot.yaml"
18−resolver: lts-14.21
18+resolver: lts-22.4
1919
2020# User packages to be built.
2121# Various formats can be used as shown in the example below.
validationt.cabal+13−8
@@ -2,9 +2,11 @@
22-- documentation, see http://haskell.org/cabal/users-guide/
33
44name: validationt
5−version: 0.3.1
6−synopsis: Straightforward validation monad.
7−description: Convenient solution for validating web forms and APIs.
5+version: 0.3.0
6+synopsis: Straightforward validation monad
7+description:
8+ A simple data validation library. The main idea is to provide an easy way to validate web form data by aggregating errors for each field.
9+ .
810homepage: https://github.com/typeable/validationt
911license: BSD3
1012license-file: LICENSE
@@ -14,9 +16,12 @@ maintainer: makeit@typeable.io
1416category: Control
1517build-type: Simple
1618extra-source-files: ChangeLog.md
19+ , README.md
1720cabal-version: >=1.10
1821tested-with: GHC == 8.4.4
1922 , GHC == 8.6.5
23+ , GHC == 8.8.4
24+ , GHC == 8.10.2
2025
2126source-repository head
2227 type: git
@@ -24,14 +29,14 @@ source-repository head
2429
2530library
2631 exposed-modules: Control.Monad.Validation
27− build-depends: base >=4.8 && < 5
28− , aeson >= 1.0
32+ build-depends: base >=4.10 && < 5
33+ , aeson >=1.0
2934 , containers
30− , exceptions
35+ , exceptions >=0.9
3136 , lens
3237 , monad-control
33− , mtl
34− , QuickCheck
38+ , mtl <2.3 || >2.3
39+ , QuickCheck >=2.8.2
3540 , text
3641 , transformers
3742 , transformers-base