git.iko.soy/typeable/schematic
on master help sign in
Update to GHC 8.2.1 and singletons 2.3.1
commitc21e21f68df2d7791b45dd78a7fe091c084db920 authorDenis Redozubov <denis.redozubov@gmail.com> dateThu 28 Sep 2017, 16:11 (9 years ago) parent5b3c3c3
4 files changed+15−13
schematic.cabal+4−4 src/Data/Schematic/Lens.hs+1−1 src/Data/Schematic/Schema.hs+6−6 stack.yaml+4−2
schematic.cabal+4−4
@@ -60,7 +60,7 @@ library
6060 , TypeOperators
6161 , TypeSynonymInstances
6262 , UndecidableInstances
63− build-depends: base >=4.9 && <4.10
63+ build-depends: base >=4.9 && <4.11
6464 , bytestring
6565 , aeson >= 1
6666 , containers
@@ -70,7 +70,7 @@ library
7070 , scientific
7171 , singletons >= 2.2
7272 , smallcheck
73− , smallcheck-series
73+ -- , smallcheck-series
7474 , tagged
7575 , text
7676 , unordered-containers
@@ -114,7 +114,7 @@ test-suite spec
114114 , TypeSynonymInstances
115115 build-depends: HUnit
116116 , aeson >= 1
117− , base >=4.9 && <4.10
117+ , base >=4.9 && <4.11
118118 , bytestring
119119 , containers
120120 , hjsonschema
@@ -126,7 +126,7 @@ test-suite spec
126126 , regex-compat
127127 , schematic
128128 , smallcheck
129− , smallcheck-series
129+ -- , smallcheck-series
130130 , singletons
131131 , tagged
132132 , text
src/Data/Schematic/Lens.hs+1−1
@@ -54,7 +54,7 @@ instance FElem fn ('(fn, r) ': rs) 'Z where
5454 {-# INLINE fput #-}
5555
5656instance (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
5858
5959 flens p f (x :& xs) = fmap (x :&) (flens p f xs)
6060 {-# INLINE flens #-}
src/Data/Schematic/Schema.hs+6−6
@@ -44,7 +44,7 @@ data TextConstraint
4444 deriving (Generic)
4545
4646instance SingKind TextConstraint where
47− type DemoteRep TextConstraint = DemotedTextConstraint
47+ type Demote TextConstraint = DemotedTextConstraint
4848 fromSing = \case
4949 STEq n -> withKnownNat n (DTEq $ natVal n)
5050 STLt n -> withKnownNat n (DTLt $ natVal n)
@@ -75,7 +75,7 @@ instance SingKind TextConstraint where
7575 Nothing -> error "Negative singleton nat"
7676 DTRegex s -> case someSymbolVal (T.unpack s) of
7777 SomeSymbol (_ :: Proxy n) -> SomeSing (STRegex (SSym :: Sing n))
78− DTEnum ss -> case toSing (T.unpack <$> ss) of
78+ DTEnum ss -> case toSing ss of
7979 SomeSing l -> SomeSing (STEnum l)
8080
8181data DemotedTextConstraint
@@ -149,7 +149,7 @@ instance Eq (Sing ('NGt n)) where _ == _ = True
149149instance Eq (Sing ('NGe n)) where _ == _ = True
150150
151151instance SingKind NumberConstraint where
152− type DemoteRep NumberConstraint = DemotedNumberConstraint
152+ type Demote NumberConstraint = DemotedNumberConstraint
153153 fromSing = \case
154154 SNEq n -> withKnownNat n (DNEq $ natVal n)
155155 SNGt n -> withKnownNat n (DNGt $ natVal n)
@@ -189,7 +189,7 @@ instance KnownNat n => SingI ('AEq n) where sing = SAEq sing
189189instance Eq (Sing ('AEq n)) where _ == _ = True
190190
191191instance SingKind ArrayConstraint where
192− type DemoteRep ArrayConstraint = DemotedArrayConstraint
192+ type Demote ArrayConstraint = DemotedArrayConstraint
193193 fromSing = \case
194194 SAEq n -> withKnownNat n (DAEq $ natVal n)
195195 toSing = \case
@@ -250,7 +250,7 @@ instance Eq (Sing ('SchemaObject cs)) where _ == _ = True
250250instance Eq (Sing ('SchemaOptional s)) where _ == _ = True
251251
252252instance SingKind Schema where
253− type DemoteRep Schema = DemotedSchema
253+ type Demote Schema = DemotedSchema
254254 fromSing = \case
255255 SSchemaText cs -> DSchemaText $ fromSing cs
256256 SSchemaNumber cs -> DSchemaNumber $ fromSing cs
@@ -275,7 +275,7 @@ instance SingKind Schema where
275275 DSchemaOptional sch -> case toSing sch of
276276 SomeSing ssch -> SomeSing $ SSchemaOptional ssch
277277 DSchemaNull -> SomeSing SSchemaNull
278− DSchemaObject cs -> case toSing ((\(sym,sch) -> (T.unpack sym, sch)) <$> cs) of
278+ DSchemaObject cs -> case toSing cs of
279279 SomeSing scs -> SomeSing $ SSchemaObject scs
280280
281281data FieldRepr :: (Symbol, Schema) -> Type where
stack.yaml+4−2
@@ -1,4 +1,4 @@
1−resolver: lts-9.01
1+resolver: nightly-2017-09-17
22
33# User packages to be built.
44# Various formats can be used as shown in the example below.
@@ -25,8 +25,10 @@ packages:
2525- '.'
2626
2727extra-deps:
28+- hjsonpointer-1.3.0
29+- hjsonschema-1.7.0
2830- validationt-0.2.0.0
29−- smallcheck-series-0.6
31+ # - smallcheck-series-0.6
3032
3133# Override default flag values for local packages and extra-deps
3234flags: {}