git.iko.soy/typeable/validationt
on master help sign in
.travis.yml+4−4
since splitsnapshots
unifiedsplit
@@ -12,12 +12,12 @@ cache:
12
12
13jobs:
13jobs:
14 include:
14 include:
15+ - ghc: 8.10.2
16+ env: SNAPSHOT="nightly-2020-11-03"
17+ - ghc: 8.8.4
18+ env: SNAPSHOT="lts-16.20"
15 - ghc: 8.6.5
19 - ghc: 8.6.5
16 env: SNAPSHOT="lts-14.22"
20 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"
21 - ghc: 8.4.4
21 - ghc: 8.4.4
22 env: SNAPSHOT="lts-12.26"
22 env: SNAPSHOT="lts-12.26"
23
23
src/Control/Monad/Validation.hs+5−2
@@ -38,11 +38,14 @@ import Data.Foldable as F
38import Data.Functor
38import Data.Functor
39import Data.List as L
39import Data.List as L
40import Data.Map.Strict as M
40import Data.Map.Strict as M
41−import Data.Monoid
42import Data.Text as T
41import Data.Text as T
43import Data.Vector as V
42import Data.Vector as V
44import Test.QuickCheck
43import Test.QuickCheck
45
44
45+#if MIN_VERSION_mtl(2,3,0)
46+import Control.Monad
47+import Control.Monad.Fix
48+#endif
46
49
47-- | Collects all thrown warnings in 'StateT' and errors
50-- | Collects all thrown warnings in 'StateT' and errors
48-- in 'ExceptT' into a single value using 'Monoid'.
51-- in 'ExceptT' into a single value using 'Monoid'.
@@ -86,7 +89,7 @@ instance (Ord k, Semigroup v) => Semigroup (MonoidMap k v) where
86
89
87instance (Ord k, Monoid v) => Monoid (MonoidMap k v) where
90instance (Ord k, Monoid v) => Monoid (MonoidMap k v) where
88 mempty = MonoidMap M.empty
91 mempty = MonoidMap M.empty
89− mappend = mmAppend
92+ mappend = (<>)
90
93
91instance (ToJSON k, ToJSON v) => ToJSON (MonoidMap k v) where
94instance (ToJSON k, ToJSON v) => ToJSON (MonoidMap k v) where
92 toJSON (MonoidMap m) = toJSON $ L.map toObj $ M.toList m
95 toJSON (MonoidMap m) = toJSON $ L.map toObj $ M.toList m
stack.yaml+1−1
@@ -15,7 +15,7 @@
15# resolver:
15# resolver:
16# name: custom-snapshot
16# name: custom-snapshot
17# location: "./custom-snapshot.yaml"
17# location: "./custom-snapshot.yaml"
18−resolver: lts-14.21
18+resolver: lts-22.4
19
19
20# User packages to be built.
20# User packages to be built.
21# Various formats can be used as shown in the example below.
21# Various formats can be used as shown in the example below.
validationt.cabal+12−8
@@ -2,10 +2,11 @@
2-- documentation, see http://haskell.org/cabal/users-guide/
2-- documentation, see http://haskell.org/cabal/users-guide/
3
3
4name: validationt
4name: validationt
5−version: 0.3.1
5+version: 0.3.0
6synopsis: Straightforward validation monad
6synopsis: Straightforward validation monad
7+description:
7−description: A simple data validation library. The main idea is to provide an easy way to
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.
8−validate web form data by aggregating errors for each field.
9+ .
9homepage: https://github.com/typeable/validationt
10homepage: https://github.com/typeable/validationt
10license: BSD3
11license: BSD3
11license-file: LICENSE
12license-file: LICENSE
@@ -15,9 +16,12 @@ maintainer: makeit@typeable.io
15category: Control
16category: Control
16build-type: Simple
17build-type: Simple
17extra-source-files: ChangeLog.md
18extra-source-files: ChangeLog.md
19+ , README.md
18cabal-version: >=1.10
20cabal-version: >=1.10
19tested-with: GHC == 8.4.4
21tested-with: GHC == 8.4.4
20 , GHC == 8.6.5
22 , GHC == 8.6.5
23+ , GHC == 8.8.4
24+ , GHC == 8.10.2
21
25
22source-repository head
26source-repository head
23 type: git
27 type: git
@@ -25,14 +29,14 @@ source-repository head
25
29
26library
30library
27 exposed-modules: Control.Monad.Validation
31 exposed-modules: Control.Monad.Validation
28− build-depends: base >=4.8 && < 5
32+ build-depends: base >=4.10 && < 5
29− , aeson >= 1.0
33+ , aeson >=1.0
30 , containers
34 , containers
31− , exceptions
35+ , exceptions >=0.9
32 , lens
36 , lens
33 , monad-control
37 , monad-control
34− , mtl
38+ , mtl <2.3 || >2.3
35− , QuickCheck
39+ , QuickCheck >=2.8.2
36 , text
40 , text
37 , transformers
41 , transformers
38 , transformers-base
42 , transformers-base