packages feed

schematic 0.2.1.0 → 0.3.0.0

raw patch · 4 files changed

+14/−18 lines, 4 filesdep −smallcheck-seriesdep ~base

Dependencies removed: smallcheck-series

Dependency ranges changed: base

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for schematic +## 0.3.0.0 -- 2017-09-28++Updated to GHC 8.2.1 and singletons 2.3.1+ ## 0.2.1.0 -- 2017-09-26  Add decodeAndValidateVersionedWithPureMList, fix tests
schematic.cabal view
@@ -1,15 +1,10 @@--- Initial schematic.cabal generated by cabal init.  For further--- documentation, see http://haskell.org/cabal/users-guide/- name:                schematic-version:             0.2.1.0+version:             0.3.0.0 synopsis:            JSON-biased spec and validation tool--- description: license:             BSD3 license-file:        LICENSE author:              Denis Redozubov maintainer:          denis.redozubov@gmail.com--- copyright: category:            Data build-type:          Simple extra-source-files:  ChangeLog.md@@ -26,7 +21,6 @@                      , Data.Schematic.Validation                      , Data.Schematic.Utils   ghc-options:       -Wall-  -- other-modules:   default-extensions:  ConstraintKinds                      , DataKinds                      , DefaultSignatures@@ -60,7 +54,7 @@                      , TypeOperators                      , TypeSynonymInstances                      , UndecidableInstances-  build-depends:       base >=4.9 && <4.10+  build-depends:       base >=4.9 && <4.11                      , bytestring                      , aeson >= 1                      , containers@@ -70,7 +64,6 @@                      , scientific                      , singletons >= 2.2                      , smallcheck-                     , smallcheck-series                      , tagged                      , text                      , unordered-containers@@ -114,7 +107,7 @@                      , TypeSynonymInstances   build-depends:       HUnit                      , aeson >= 1-                     , base >=4.9 && <4.10+                     , base >=4.9 && <4.11                      , bytestring                      , containers                      , hjsonschema@@ -126,7 +119,6 @@                      , regex-compat                      , schematic                      , smallcheck-                     , smallcheck-series                      , singletons                      , tagged                      , text
src/Data/Schematic/Lens.hs view
@@ -54,7 +54,7 @@   {-# INLINE fput #-}  instance (FIndex r (s ': rs) ~ 'S i, FElem r rs i) => FElem r (s ': rs) ('S i) where-  type ByRevision fn (s ': rs) ('S i) = ByRevision fn rs i+  type ByRevision r (s ': rs) ('S i) = ByRevision r rs i    flens p f (x :& xs) = fmap (x :&) (flens p f xs)   {-# INLINE flens #-}
src/Data/Schematic/Schema.hs view
@@ -44,7 +44,7 @@   deriving (Generic)  instance SingKind TextConstraint where-  type DemoteRep TextConstraint = DemotedTextConstraint+  type Demote TextConstraint = DemotedTextConstraint   fromSing = \case     STEq n -> withKnownNat n (DTEq $ natVal n)     STLt n -> withKnownNat n (DTLt $ natVal n)@@ -75,7 +75,7 @@       Nothing -> error "Negative singleton nat"     DTRegex s -> case someSymbolVal (T.unpack s) of       SomeSymbol (_ :: Proxy n) -> SomeSing (STRegex (SSym :: Sing n))-    DTEnum ss -> case toSing (T.unpack <$> ss) of+    DTEnum ss -> case toSing ss of       SomeSing l -> SomeSing (STEnum l)  data DemotedTextConstraint@@ -149,7 +149,7 @@ instance Eq (Sing ('NGe n)) where _ == _ = True  instance SingKind NumberConstraint where-  type DemoteRep NumberConstraint = DemotedNumberConstraint+  type Demote NumberConstraint = DemotedNumberConstraint   fromSing = \case     SNEq n -> withKnownNat n (DNEq $ natVal n)     SNGt n -> withKnownNat n (DNGt $ natVal n)@@ -189,7 +189,7 @@ instance Eq (Sing ('AEq n)) where _ == _ = True  instance SingKind ArrayConstraint where-  type DemoteRep ArrayConstraint = DemotedArrayConstraint+  type Demote ArrayConstraint = DemotedArrayConstraint   fromSing = \case     SAEq n -> withKnownNat n (DAEq $ natVal n)   toSing = \case@@ -250,7 +250,7 @@ instance Eq (Sing ('SchemaOptional s)) where _ == _ = True  instance SingKind Schema where-  type DemoteRep Schema = DemotedSchema+  type Demote Schema = DemotedSchema   fromSing = \case     SSchemaText cs -> DSchemaText $ fromSing cs     SSchemaNumber cs -> DSchemaNumber $ fromSing cs@@ -275,7 +275,7 @@     DSchemaOptional sch -> case toSing sch of       SomeSing ssch -> SomeSing $ SSchemaOptional ssch     DSchemaNull -> SomeSing SSchemaNull-    DSchemaObject cs -> case toSing ((\(sym,sch) -> (T.unpack sym, sch)) <$> cs) of+    DSchemaObject cs -> case toSing cs of       SomeSing scs -> SomeSing $ SSchemaObject scs  data FieldRepr :: (Symbol, Schema) -> Type where