git.iko.soy/typeable/schematic
on master help sign in
Update to GHC 8.2.1 and singletons 2.3.1
c21e21fDenis Redozubov
schematic.cabal+4−4
@@ -60,7 +60,7 @@ library
60 , TypeOperators
60 , TypeOperators
61 , TypeSynonymInstances
61 , TypeSynonymInstances
62 , UndecidableInstances
62 , UndecidableInstances
63− build-depends: base >=4.9 && <4.10
63+ build-depends: base >=4.9 && <4.11
64 , bytestring
64 , bytestring
65 , aeson >= 1
65 , aeson >= 1
66 , containers
66 , containers
@@ -70,7 +70,7 @@ library
70 , scientific
70 , scientific
71 , singletons >= 2.2
71 , singletons >= 2.2
72 , smallcheck
72 , smallcheck
73− , smallcheck-series
73+ -- , smallcheck-series
74 , tagged
74 , tagged
75 , text
75 , text
76 , unordered-containers
76 , unordered-containers
@@ -114,7 +114,7 @@ test-suite spec
114 , TypeSynonymInstances
114 , TypeSynonymInstances
115 build-depends: HUnit
115 build-depends: HUnit
116 , aeson >= 1
116 , aeson >= 1
117− , base >=4.9 && <4.10
117+ , base >=4.9 && <4.11
118 , bytestring
118 , bytestring
119 , containers
119 , containers
120 , hjsonschema
120 , hjsonschema
@@ -126,7 +126,7 @@ test-suite spec
126 , regex-compat
126 , regex-compat
127 , schematic
127 , schematic
128 , smallcheck
128 , smallcheck
129− , smallcheck-series
129+ -- , smallcheck-series
130 , singletons
130 , singletons
131 , tagged
131 , tagged
132 , text
132 , 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+4−2
@@ -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.
@@ -25,8 +25,10 @@ packages:
25- '.'
25- '.'
26
26
27extra-deps:
27extra-deps:
28+- hjsonpointer-1.3.0
29+- hjsonschema-1.7.0
28- validationt-0.2.0.0
30- validationt-0.2.0.0
29−- smallcheck-series-0.6
31+ # - smallcheck-series-0.6
30
32
31# Override default flag values for local packages and extra-deps
33# Override default flag values for local packages and extra-deps
32flags: {}
34flags: {}