Resolving dependencies... Configuring base64-bytestring-1.0.0.1... Configuring base16-bytestring-0.1.1.6... Building base64-bytestring-1.0.0.1... Building base16-bytestring-0.1.1.6... Installed base16-bytestring-0.1.1.6 Configuring byteable-0.1.1... Building byteable-0.1.1... Configuring data-default-class-0.1.2.0... Installed base64-bytestring-1.0.0.1 Building data-default-class-0.1.2.0... Configuring dlist-0.8.0.2... Installed byteable-0.1.1 Building dlist-0.8.0.2... Configuring entropy-0.3.7... Installed data-default-class-0.1.2.0 Configuring fail-4.9.0.0... Installed dlist-0.8.0.2 Building fail-4.9.0.0... Configuring mtl-2.2.1... Installed fail-4.9.0.0 Building mtl-2.2.1... Building entropy-0.3.7... Configuring memory-0.13... Installed entropy-0.3.7 Building memory-0.13... Configuring old-locale-1.0.0.7... Installed mtl-2.2.1 Building old-locale-1.0.0.7... Configuring primitive-0.6.1.0... Installed old-locale-1.0.0.7 Building primitive-0.6.1.0... Configuring network-2.6.3.1... Installed memory-0.13 Configuring random-1.1... Installed primitive-0.6.1.0 Building random-1.1... Building network-2.6.3.1... Configuring stm-2.4.4.1... Installed random-1.1 Building stm-2.4.4.1... Configuring syb-0.6... Installed stm-2.4.4.1 Building syb-0.6... Configuring transformers-compat-0.5.1.4... Installed network-2.6.3.1 Building transformers-compat-0.5.1.4... Configuring text-1.2.2.1... Installed syb-0.6 Configuring zlib-0.6.1.2... Installed transformers-compat-0.5.1.4 Building text-1.2.2.1... Building zlib-0.6.1.2... Installed zlib-0.6.1.2 Configuring scrypt-0.5.0... Building scrypt-0.5.0... Configuring cryptonite-0.20... Installed scrypt-0.5.0 Building cryptonite-0.20... Configuring vector-0.11.0.0... Installed text-1.2.2.1 Building vector-0.11.0.0... Configuring async-2.1.1... Installed vector-0.11.0.0 Building async-2.1.1... Configuring MonadRandom-0.4.2.3... Installed cryptonite-0.20 Building MonadRandom-0.4.2.3... Configuring exceptions-0.8.3... Installed async-2.1.1 Building exceptions-0.8.3... Configuring tagged-0.8.5... Installed MonadRandom-0.4.2.3 Building tagged-0.8.5... Configuring transformers-base-0.4.4... Installed exceptions-0.8.3 Building transformers-base-0.4.4... Installed tagged-0.8.5 Configuring hashable-1.2.4.0... Building hashable-1.2.4.0... Configuring mime-types-0.1.0.7... Installed transformers-base-0.4.4 Building mime-types-0.1.0.7... Configuring blaze-builder-0.4.0.2... Installed hashable-1.2.4.0 Building blaze-builder-0.4.0.2... Configuring parsec-3.1.11... Installed blaze-builder-0.4.0.2 Configuring retry-0.7.4.2... Installed mime-types-0.1.0.7 Building parsec-3.1.11... Building retry-0.7.4.2... Configuring cryptohash-0.11.9... Installed retry-0.7.4.2 Building cryptohash-0.11.9... Installed parsec-3.1.11 Configuring monad-control-1.0.1.0... Building monad-control-1.0.1.0... Installed cryptohash-0.11.9 Configuring case-insensitive-1.2.0.7... Building case-insensitive-1.2.0.7... Configuring scientific-0.3.4.9... Installed monad-control-1.0.1.0 Building scientific-0.3.4.9... Configuring cookie-0.4.2.1... Installed case-insensitive-1.2.0.7 Building cookie-0.4.2.1... Configuring unordered-containers-0.2.7.1... Installed scientific-0.3.4.9 Configuring streaming-commons-0.1.16... Installed cookie-0.4.2.1 Building unordered-containers-0.2.7.1... Building streaming-commons-0.1.16... Configuring network-uri-2.6.1.0... Installed streaming-commons-0.1.16 Building network-uri-2.6.1.0... Configuring inflections-0.2.0.1... Installed unordered-containers-0.2.7.1 Building inflections-0.2.0.1... Installed network-uri-2.6.1.0 Configuring resource-pool-0.2.3.2... Configuring http-types-0.9.1... Installed inflections-0.2.0.1 Building resource-pool-0.2.3.2... Building http-types-0.9.1... Configuring attoparsec-0.13.1.0... Installed resource-pool-0.2.3.2 Building attoparsec-0.13.1.0... Installed http-types-0.9.1 Configuring http-client-0.4.31.2... Building http-client-0.4.31.2... Installed attoparsec-0.13.1.0 Configuring aeson-0.11.2.1... Building aeson-0.11.2.1... Installed http-client-0.4.31.2 Installed aeson-0.11.2.1 Configuring influxdb-0.10.0... Configuring rethinkdb-client-driver-0.0.23... Building influxdb-0.10.0... Building rethinkdb-client-driver-0.0.23... Installed influxdb-0.10.0 Installed rethinkdb-client-driver-0.0.23 Downloading avers-0.0.1... Configuring avers-0.0.1... Building avers-0.0.1... Failed to install avers-0.0.1 Build log ( /home/builder/.cabal/logs/avers-0.0.1.log ): cabal: Entering directory '/tmp/cabal-tmp-17574/avers-0.0.1' Configuring avers-0.0.1... Warning: 'ghc-options: -threaded' has no effect for libraries. It should only be used for executables. Building avers-0.0.1... Preprocessing library avers-0.0.1... [1 of 9] Compiling Avers.TH ( src/Avers/TH.hs, dist/build/Avers/TH.o ) src/Avers/TH.hs:109:5: error: • Couldn't match type ‘[Dec] -> Dec’ with ‘Dec’ Expected type: Q [Dec] Actual type: Q [[Dec] -> Dec] • In a stmt of a 'do' block: return [InstanceD [ClassP ''FromJSON [VarT tv] | tv <- tyVars] (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseJSON [...]]] In the expression: do { xN <- newName "x"; (tyVarsBndrs, fieldNames) <- getTyInfo typeN; parseJsonE <- mkParseJSON options typeN; insertDefaultsE <- mkInsertDefaults defaults; .... } In an equation for ‘deriveFromJSONWithDefaults’: deriveFromJSONWithDefaults options typeN defaults = do { xN <- newName "x"; (tyVarsBndrs, fieldNames) <- getTyInfo typeN; parseJsonE <- mkParseJSON options typeN; .... } where typeT = ConT typeN fromJsonT = ConT ''FromJSON src/Avers/TH.hs:110:21: error: • Couldn't match expected type ‘Maybe Overlap’ with actual type ‘[t1]’ • In the first argument of ‘InstanceD’, namely ‘[ClassP ''FromJSON [VarT tv] | tv <- tyVars]’ In the expression: InstanceD [ClassP ''FromJSON [VarT tv] | tv <- tyVars] (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseJSON [Clause [...] (NormalB (AppE parseJsonE (mkApps [...]))) []]] In the first argument of ‘return’, namely ‘[InstanceD [ClassP ''FromJSON [VarT tv] | tv <- tyVars] (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseJSON [...]]]’ src/Avers/TH.hs:110:22: error: • Data constructor not in scope: ClassP :: Name -> [Type] -> t1 • Perhaps you meant one of these: ‘ClassD’ (imported from Language.Haskell.TH), ‘ClassI’ (imported from Language.Haskell.TH), variable ‘classP’ (imported from Language.Haskell.TH) src/Avers/TH.hs:111:14: error: • Couldn't match type ‘Type’ with ‘[Pred]’ Expected type: Cxt Actual type: Type • In the second argument of ‘InstanceD’, namely ‘(AppT fromJsonT (mkAppTys (typeT : map VarT tyVars)))’ In the expression: InstanceD [ClassP ''FromJSON [VarT tv] | tv <- tyVars] (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseJSON [Clause [...] (NormalB (AppE parseJsonE (mkApps [...]))) []]] In the first argument of ‘return’, namely ‘[InstanceD [ClassP ''FromJSON [VarT tv] | tv <- tyVars] (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseJSON [...]]]’ src/Avers/TH.hs:112:13: error: • Couldn't match expected type ‘Type’ with actual type ‘[Dec]’ • In the third argument of ‘InstanceD’, namely ‘[FunD 'parseJSON [Clause [...] (NormalB (AppE parseJsonE (mkApps [...]))) []]]’ In the expression: InstanceD [ClassP ''FromJSON [VarT tv] | tv <- tyVars] (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseJSON [Clause [...] (NormalB (AppE parseJsonE (mkApps [...]))) []]] In the first argument of ‘return’, namely ‘[InstanceD [ClassP ''FromJSON [VarT tv] | tv <- tyVars] (AppT fromJsonT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseJSON [...]]]’ src/Avers/TH.hs:170:5: error: • Couldn't match type ‘[Dec] -> Dec’ with ‘Dec’ Expected type: Q [Dec] Actual type: Q [[Dec] -> Dec] • In a stmt of a 'do' block: return [InstanceD [ClassP ''FromDatum [VarT tv] | tv <- tyVars] (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseDatum [...]]] In the expression: do { xN <- newName "x"; (tyVarsBndrs, fieldNames) <- getTyInfo typeN; parseJsonE <- mkParseDatum options typeN; insertDefaultsE <- mkInsertDatumDefaults defaults; .... } In an equation for ‘deriveFromDatumWithDefaults’: deriveFromDatumWithDefaults options typeN defaults = do { xN <- newName "x"; (tyVarsBndrs, fieldNames) <- getTyInfo typeN; parseJsonE <- mkParseDatum options typeN; .... } where typeT = ConT typeN fromDatumT = ConT ''FromDatum src/Avers/TH.hs:171:21: error: • Couldn't match expected type ‘Maybe Overlap’ with actual type ‘[t0]’ • In the first argument of ‘InstanceD’, namely ‘[ClassP ''FromDatum [VarT tv] | tv <- tyVars]’ In the expression: InstanceD [ClassP ''FromDatum [VarT tv] | tv <- tyVars] (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseDatum [Clause [...] (NormalB (AppE parseJsonE (mkApps [...]))) []]] In the first argument of ‘return’, namely ‘[InstanceD [ClassP ''FromDatum [VarT tv] | tv <- tyVars] (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseDatum [...]]]’ src/Avers/TH.hs:171:22: error: • Data constructor not in scope: ClassP :: Name -> [Type] -> t0 • Perhaps you meant one of these: ‘ClassD’ (imported from Language.Haskell.TH), ‘ClassI’ (imported from Language.Haskell.TH), variable ‘classP’ (imported from Language.Haskell.TH) src/Avers/TH.hs:172:14: error: • Couldn't match type ‘Type’ with ‘[Pred]’ Expected type: Cxt Actual type: Type • In the second argument of ‘InstanceD’, namely ‘(AppT fromDatumT (mkAppTys (typeT : map VarT tyVars)))’ In the expression: InstanceD [ClassP ''FromDatum [VarT tv] | tv <- tyVars] (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseDatum [Clause [...] (NormalB (AppE parseJsonE (mkApps [...]))) []]] In the first argument of ‘return’, namely ‘[InstanceD [ClassP ''FromDatum [VarT tv] | tv <- tyVars] (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseDatum [...]]]’ src/Avers/TH.hs:173:13: error: • Couldn't match expected type ‘Type’ with actual type ‘[Dec]’ • In the third argument of ‘InstanceD’, namely ‘[FunD 'parseDatum [Clause [...] (NormalB (AppE parseJsonE (mkApps [...]))) []]]’ In the expression: InstanceD [ClassP ''FromDatum [VarT tv] | tv <- tyVars] (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseDatum [Clause [...] (NormalB (AppE parseJsonE (mkApps [...]))) []]] In the first argument of ‘return’, namely ‘[InstanceD [ClassP ''FromDatum [VarT tv] | tv <- tyVars] (AppT fromDatumT (mkAppTys (typeT : map VarT tyVars))) [FunD 'parseDatum [...]]]’ src/Avers/TH.hs:219:17: error: • The constructor ‘DataD’ should have 6 arguments, but has been given 5 • In the pattern: DataD _ _ tvbs cons _ In the pattern: TyConI (DataD _ _ tvbs cons _) In a case alternative: TyConI (DataD _ _ tvbs cons _) -> pure (tvbs, getFieldNames =<< cons) cabal: Leaving directory '/tmp/cabal-tmp-17574/avers-0.0.1' cabal: Error: some packages failed to install: avers-0.0.1 failed during the building phase. The exception was: ExitFailure 1