on master help sign in
Update to GHC 8.2.1 and singletons 2.3.1
6dea4a4Denis Redozubov
schematic.cabal+2−10
@@ -1,15 +1,10 @@
1−-- Initial schematic.cabal generated by cabal init. For further
2−-- documentation, see http://haskell.org/cabal/users-guide/
3−
4name: schematic
1name: schematic
5version: 0.2.1.0
2version: 0.2.1.0
6synopsis: JSON-biased spec and validation tool
3synopsis: JSON-biased spec and validation tool
7−-- description:
8license: BSD3
4license: BSD3
9license-file: LICENSE
5license-file: LICENSE
10author: Denis Redozubov
6author: Denis Redozubov
11maintainer: denis.redozubov@gmail.com
7maintainer: denis.redozubov@gmail.com
12−-- copyright:
13category: Data
8category: Data
14build-type: Simple
9build-type: Simple
15extra-source-files: ChangeLog.md
10extra-source-files: ChangeLog.md
@@ -26,7 +21,6 @@ library
26 , Data.Schematic.Validation
21 , Data.Schematic.Validation
27 , Data.Schematic.Utils
22 , Data.Schematic.Utils
28 ghc-options: -Wall
23 ghc-options: -Wall
29− -- other-modules:
30 default-extensions: ConstraintKinds
24 default-extensions: ConstraintKinds
31 , DataKinds
25 , DataKinds
32 , DefaultSignatures
26 , DefaultSignatures
@@ -60,7 +54,7 @@ library
60 , TypeOperators
54 , TypeOperators
61 , TypeSynonymInstances
55 , TypeSynonymInstances
62 , UndecidableInstances
56 , UndecidableInstances
63− build-depends: base >=4.9 && <4.10
57+ build-depends: base >=4.9 && <4.11
64 , bytestring
58 , bytestring
65 , aeson >= 1
59 , aeson >= 1
66 , containers
60 , containers
@@ -70,7 +64,6 @@ library
70 , scientific
64 , scientific
71 , singletons >= 2.2
65 , singletons >= 2.2
72 , smallcheck
66 , smallcheck
73− , smallcheck-series
74 , tagged
67 , tagged
75 , text
68 , text
76 , unordered-containers
69 , unordered-containers
@@ -114,7 +107,7 @@ test-suite spec
114 , TypeSynonymInstances
107 , TypeSynonymInstances
115 build-depends: HUnit
108 build-depends: HUnit
116 , aeson >= 1
109 , aeson >= 1
117− , base >=4.9 && <4.10
110+ , base >=4.9 && <4.11
118 , bytestring
111 , bytestring
119 , containers
112 , containers
120 , hjsonschema
113 , hjsonschema
@@ -126,7 +119,6 @@ test-suite spec
126 , regex-compat
119 , regex-compat
127 , schematic
120 , schematic
128 , smallcheck
121 , smallcheck
129− , smallcheck-series
130 , singletons
122 , singletons
131 , tagged
123 , tagged
132 , text
124 , text
src/Data/Schematic/Lens.hs+1−1
@@ -54,7 +54,7 @@ instance FElem fn ('(fn, r) ': rs) 'Z where
54 {-# INLINE fput #-}
54 {-# INLINE fput #-}
55
55
56instance (FIndex r (s ': rs) ~ 'S i, FElem r rs i) => FElem r (s ': rs) ('S i) where
56instance (FIndex r (s ': rs) ~ 'S i, FElem r rs i) => FElem r (s ': rs) ('S i) where
57− type ByRevision fn (s ': rs) ('S i) = ByRevision fn rs i
57+ type ByRevision r (s ': rs) ('S i) = ByRevision r rs i
58
58
59 flens p f (x :& xs) = fmap (x :&) (flens p f xs)
59 flens p f (x :& xs) = fmap (x :&) (flens p f xs)
60 {-# INLINE flens #-}
60 {-# INLINE flens #-}
src/Data/Schematic/Schema.hs+6−6
@@ -44,7 +44,7 @@ data TextConstraint
44 deriving (Generic)
44 deriving (Generic)
45
45
46instance SingKind TextConstraint where
46instance SingKind TextConstraint where
47− type DemoteRep TextConstraint = DemotedTextConstraint
47+ type Demote TextConstraint = DemotedTextConstraint
48 fromSing = \case
48 fromSing = \case
49 STEq n -> withKnownNat n (DTEq $ natVal n)
49 STEq n -> withKnownNat n (DTEq $ natVal n)
50 STLt n -> withKnownNat n (DTLt $ natVal n)
50 STLt n -> withKnownNat n (DTLt $ natVal n)
@@ -75,7 +75,7 @@ instance SingKind TextConstraint where
75 Nothing -> error "Negative singleton nat"
75 Nothing -> error "Negative singleton nat"
76 DTRegex s -> case someSymbolVal (T.unpack s) of
76 DTRegex s -> case someSymbolVal (T.unpack s) of
77 SomeSymbol (_ :: Proxy n) -> SomeSing (STRegex (SSym :: Sing n))
77 SomeSymbol (_ :: Proxy n) -> SomeSing (STRegex (SSym :: Sing n))
78− DTEnum ss -> case toSing (T.unpack <$> ss) of
78+ DTEnum ss -> case toSing ss of
79 SomeSing l -> SomeSing (STEnum l)
79 SomeSing l -> SomeSing (STEnum l)
80
80
81data DemotedTextConstraint
81data DemotedTextConstraint
@@ -149,7 +149,7 @@ instance Eq (Sing ('NGt n)) where _ == _ = True
149instance Eq (Sing ('NGe n)) where _ == _ = True
149instance Eq (Sing ('NGe n)) where _ == _ = True
150
150
151instance SingKind NumberConstraint where
151instance SingKind NumberConstraint where
152− type DemoteRep NumberConstraint = DemotedNumberConstraint
152+ type Demote NumberConstraint = DemotedNumberConstraint
153 fromSing = \case
153 fromSing = \case
154 SNEq n -> withKnownNat n (DNEq $ natVal n)
154 SNEq n -> withKnownNat n (DNEq $ natVal n)
155 SNGt n -> withKnownNat n (DNGt $ natVal n)
155 SNGt n -> withKnownNat n (DNGt $ natVal n)
@@ -189,7 +189,7 @@ instance KnownNat n => SingI ('AEq n) where sing = SAEq sing
189instance Eq (Sing ('AEq n)) where _ == _ = True
189instance Eq (Sing ('AEq n)) where _ == _ = True
190
190
191instance SingKind ArrayConstraint where
191instance SingKind ArrayConstraint where
192− type DemoteRep ArrayConstraint = DemotedArrayConstraint
192+ type Demote ArrayConstraint = DemotedArrayConstraint
193 fromSing = \case
193 fromSing = \case
194 SAEq n -> withKnownNat n (DAEq $ natVal n)
194 SAEq n -> withKnownNat n (DAEq $ natVal n)
195 toSing = \case
195 toSing = \case
@@ -250,7 +250,7 @@ instance Eq (Sing ('SchemaObject cs)) where _ == _ = True
250instance Eq (Sing ('SchemaOptional s)) where _ == _ = True
250instance Eq (Sing ('SchemaOptional s)) where _ == _ = True
251
251
252instance SingKind Schema where
252instance SingKind Schema where
253− type DemoteRep Schema = DemotedSchema
253+ type Demote Schema = DemotedSchema
254 fromSing = \case
254 fromSing = \case
255 SSchemaText cs -> DSchemaText $ fromSing cs
255 SSchemaText cs -> DSchemaText $ fromSing cs
256 SSchemaNumber cs -> DSchemaNumber $ fromSing cs
256 SSchemaNumber cs -> DSchemaNumber $ fromSing cs
@@ -275,7 +275,7 @@ instance SingKind Schema where
275 DSchemaOptional sch -> case toSing sch of
275 DSchemaOptional sch -> case toSing sch of
276 SomeSing ssch -> SomeSing $ SSchemaOptional ssch
276 SomeSing ssch -> SomeSing $ SSchemaOptional ssch
277 DSchemaNull -> SomeSing SSchemaNull
277 DSchemaNull -> SomeSing SSchemaNull
278− DSchemaObject cs -> case toSing ((\(sym,sch) -> (T.unpack sym, sch)) <$> cs) of
278+ DSchemaObject cs -> case toSing cs of
279 SomeSing scs -> SomeSing $ SSchemaObject scs
279 SomeSing scs -> SomeSing $ SSchemaObject scs
280
280
281data FieldRepr :: (Symbol, Schema) -> Type where
281data FieldRepr :: (Symbol, Schema) -> Type where
stack.yaml+3−5
@@ -1,4 +1,4 @@
1−resolver: lts-9.01
1+resolver: nightly-2017-09-17
2
2
3# User packages to be built.
3# User packages to be built.
4# Various formats can be used as shown in the example below.
4# Various formats can be used as shown in the example below.
@@ -19,14 +19,12 @@ resolver: lts-9.01
19# non-dependency (i.e. a user package), and its test suites and benchmarks
19# non-dependency (i.e. a user package), and its test suites and benchmarks
20# will not be run. This is useful for tweaking upstream packages.
20# will not be run. This is useful for tweaking upstream packages.
21packages:
21packages:
22−#- location:
23− #git: https://github.com/typeable/validationt.git
24− #commit: 24578c9fd408179358c641ee1fff0eb182591f4b
25- '.'
22- '.'
26
23
27extra-deps:
24extra-deps:
25+- hjsonpointer-1.3.0
26+- hjsonschema-1.7.0
28- validationt-0.2.0.0
27- validationt-0.2.0.0
29−- smallcheck-series-0.6
30
28
31# Override default flag values for local packages and extra-deps
29# Override default flag values for local packages and extra-deps
32flags: {}
30flags: {}