git.iko.soy/typeable/validationt
on 8f105b7 help sign in
src/Control/Monad/Validation.hs+2−5
since splitsnapshots
unifiedsplit
@@ -38,14 +38,11 @@ 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
41import Data.Text as T
42import Data.Text as T
42import Data.Vector as V
43import Data.Vector as V
43import Test.QuickCheck
44import Test.QuickCheck
44
45
45−#if MIN_VERSION_mtl(2,3,0)
46−import Control.Monad
47−import Control.Monad.Fix
48−#endif
49
46
50-- | Collects all thrown warnings in 'StateT' and errors
47-- | Collects all thrown warnings in 'StateT' and errors
51-- in 'ExceptT' into a single value using 'Monoid'.
48-- in 'ExceptT' into a single value using 'Monoid'.
@@ -89,7 +86,7 @@ instance (Ord k, Semigroup v) => Semigroup (MonoidMap k v) where
89
86
90instance (Ord k, Monoid v) => Monoid (MonoidMap k v) where
87instance (Ord k, Monoid v) => Monoid (MonoidMap k v) where
91 mempty = MonoidMap M.empty
88 mempty = MonoidMap M.empty
92− mappend = (<>)
89+ mappend = mmAppend
93
90
94instance (ToJSON k, ToJSON v) => ToJSON (MonoidMap k v) where
91instance (ToJSON k, ToJSON v) => ToJSON (MonoidMap k v) where
95 toJSON (MonoidMap m) = toJSON $ L.map toObj $ M.toList m
92 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-22.4
18+resolver: lts-16.20
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+7−9
@@ -4,9 +4,8 @@
4name: validationt
4name: validationt
5version: 0.3.0
5version: 0.3.0
6synopsis: Straightforward validation monad
6synopsis: 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.
7+description: A simple data validation library. The main idea is to provide an easy way to
9− .
8+validate web form data by aggregating errors for each field.
10homepage: https://github.com/typeable/validationt
9homepage: https://github.com/typeable/validationt
11license: BSD3
10license: BSD3
12license-file: LICENSE
11license-file: LICENSE
@@ -16,7 +15,6 @@ maintainer: makeit@typeable.io
16category: Control
15category: Control
17build-type: Simple
16build-type: Simple
18extra-source-files: ChangeLog.md
17extra-source-files: ChangeLog.md
19− , README.md
20cabal-version: >=1.10
18cabal-version: >=1.10
21tested-with: GHC == 8.4.4
19tested-with: GHC == 8.4.4
22 , GHC == 8.6.5
20 , GHC == 8.6.5
@@ -29,14 +27,14 @@ source-repository head
29
27
30library
28library
31 exposed-modules: Control.Monad.Validation
29 exposed-modules: Control.Monad.Validation
32− build-depends: base >=4.10 && < 5
30+ build-depends: base >=4.8 && < 5
33− , aeson >=1.0
31+ , aeson >= 1.0
34 , containers
32 , containers
35− , exceptions >=0.9
33+ , exceptions
36 , lens
34 , lens
37 , monad-control
35 , monad-control
38− , mtl <2.3 || >2.3
36+ , mtl
39− , QuickCheck >=2.8.2
37+ , QuickCheck
40 , text
38 , text
41 , transformers
39 , transformers
42 , transformers-base
40 , transformers-base