on master help sign in
Update to GHC 8.2.1 and singletons 2.3.1
commit6dea4a489b99cff0d802c2f1a4f072b97cc3b493 authorDenis Redozubov <denis.redozubov@gmail.com> dateThu 28 Sep 2017, 16:11 (9 years ago) parent5b3c3c3
4 files changed+12−22
schematic.cabal+2−10 src/Data/Schematic/Lens.hs+1−1 src/Data/Schematic/Schema.hs+6−6 stack.yaml+3−5
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−
41name: schematic
52version: 0.2.1.0
63synopsis: JSON-biased spec and validation tool
7−-- description:
84license: BSD3
95license-file: LICENSE
106author: Denis Redozubov
117maintainer: denis.redozubov@gmail.com
12−-- copyright:
138category: Data
149build-type: Simple
1510extra-source-files: ChangeLog.md
@@ -26,7 +21,6 @@ library
2621 , Data.Schematic.Validation
2722 , Data.Schematic.Utils
2823 ghc-options: -Wall
29− -- other-modules:
3024 default-extensions: ConstraintKinds
3125 , DataKinds
3226 , DefaultSignatures
@@ -60,7 +54,7 @@ library
6054 , TypeOperators
6155 , TypeSynonymInstances
6256 , UndecidableInstances
63− build-depends: base >=4.9 && <4.10
57+ build-depends: base >=4.9 && <4.11
6458 , bytestring
6559 , aeson >= 1
6660 , containers
@@ -70,7 +64,6 @@ library
7064 , scientific
7165 , singletons >= 2.2
7266 , smallcheck
73− , smallcheck-series
7467 , tagged
7568 , text
7669 , unordered-containers
@@ -114,7 +107,7 @@ test-suite spec
114107 , TypeSynonymInstances
115108 build-depends: HUnit
116109 , aeson >= 1
117− , base >=4.9 && <4.10
110+ , base >=4.9 && <4.11
118111 , bytestring
119112 , containers
120113 , hjsonschema
@@ -126,7 +119,6 @@ test-suite spec
126119 , regex-compat
127120 , schematic
128121 , smallcheck
129− , smallcheck-series
130122 , singletons
131123 , tagged
132124 , 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+3−5
@@ -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.
@@ -19,14 +19,12 @@ resolver: lts-9.01
1919# non-dependency (i.e. a user package), and its test suites and benchmarks
2020# will not be run. This is useful for tweaking upstream packages.
2121packages:
22−#- location:
23− #git: https://github.com/typeable/validationt.git
24− #commit: 24578c9fd408179358c641ee1fff0eb182591f4b
2522- '.'
2623
2724extra-deps:
25+- hjsonpointer-1.3.0
26+- hjsonschema-1.7.0
2827- validationt-0.2.0.0
29−- smallcheck-series-0.6
3028
3129# Override default flag values for local packages and extra-deps
3230flags: {}