avers 0.0.3 → 0.0.4
raw patch · 2 files changed
+12/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- avers.cabal +7/−2
- src/Avers/TH.hs +5/−2
avers.cabal view
@@ -1,5 +1,5 @@ name: avers-version: 0.0.3+version: 0.0.4 license: GPL-3 license-file: LICENSE author: Tomas Carnecky@@ -12,12 +12,17 @@ description: empty +source-repository head+ type: git+ location: git://github.com/wereHamster/avers-haskell.git++ library hs-source-dirs: src default-language: Haskell2010 ghc-options:- -threaded -Wall+ -Wall -- For the time being everything is exported.
src/Avers/TH.hs view
@@ -34,6 +34,7 @@ import Database.RethinkDB (toDatum, FromDatum(..)) import Database.RethinkDB.TH +import Prelude dropPrefix :: String -> String -> String@@ -106,8 +107,9 @@ "Avers.TH.deriveFromJSONWithDefaults: default " ++ "specified for " ++ show name ++ " but this field does not exist." + icxt <- mapM (\tv -> classP ''FromJSON [varT tv]) tyVars return- [ InstanceD [ClassP ''FromJSON [VarT tv] | tv <- tyVars]+ [ InstanceD icxt (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars))) [ FunD 'parseJSON [ Clause [VarP xN]@@ -167,8 +169,9 @@ "Avers.TH.deriveFromDatumWithDefaults: default " ++ "specified for " ++ show name ++ " but this field does not exist." + icxt <- mapM (\tv -> classP ''FromDatum [varT tv]) tyVars return- [ InstanceD [ClassP ''FromDatum [VarT tv] | tv <- tyVars]+ [ InstanceD icxt (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars))) [ FunD 'parseDatum [ Clause [VarP xN]