Resolving dependencies... Configuring base16-bytestring-0.1.1.6... Configuring base-compat-0.9.1... Building base16-bytestring-0.1.1.6... Building base-compat-0.9.1... Installed base16-bytestring-0.1.1.6 Configuring dlist-0.8.0.2... Building dlist-0.8.0.2... Installed base-compat-0.9.1 Configuring mtl-2.2.1... Building mtl-2.2.1... Installed dlist-0.8.0.2 Configuring mysql-0.1.4... Installed mtl-2.2.1 Configuring old-locale-1.0.0.7... Building mysql-0.1.4... Building old-locale-1.0.0.7... Configuring pcre-light-0.4.0.4... Installed old-locale-1.0.0.7 Building pcre-light-0.4.0.4... Configuring primitive-0.6.1.0... Installed pcre-light-0.4.0.4 Configuring safe-0.3.10... Installed mysql-0.1.4 Building primitive-0.6.1.0... Building safe-0.3.10... Configuring syb-0.6... Installed safe-0.3.10 Building syb-0.6... Configuring text-1.2.2.1... Installed primitive-0.6.1.0 Building text-1.2.2.1... Configuring th-lift-0.7.6... Installed syb-0.6 Building th-lift-0.7.6... Configuring time-locale-compat-0.1.1.3... Installed th-lift-0.7.6 Building time-locale-compat-0.1.1.3... Configuring transformers-compat-0.5.1.4... Installed time-locale-compat-0.1.1.3 Building transformers-compat-0.5.1.4... Configuring utf8-string-1.0.1.1... Installed transformers-compat-0.5.1.4 Building utf8-string-1.0.1.1... Installed utf8-string-1.0.1.1 Configuring old-time-1.1.0.3... Building old-time-1.1.0.3... Configuring th-expand-syns-0.4.1.0... Installed text-1.2.2.1 Building th-expand-syns-0.4.1.0... Configuring vector-0.11.0.0... Installed old-time-1.1.0.3 Configuring tagged-0.8.5... Installed th-expand-syns-0.4.1.0 Building vector-0.11.0.0... Building tagged-0.8.5... Installed tagged-0.8.5 Configuring blaze-builder-0.4.0.2... Building blaze-builder-0.4.0.2... Configuring hashable-1.2.4.0... Installed blaze-builder-0.4.0.2 Building hashable-1.2.4.0... Configuring polyparse-1.12... Installed hashable-1.2.4.0 Building polyparse-1.12... Configuring parsec-3.1.11... Installed polyparse-1.12 Building parsec-3.1.11... Configuring th-reify-many-0.1.6... Installed vector-0.11.0.0 Building th-reify-many-0.1.6... Installed parsec-3.1.11 Configuring unordered-containers-0.2.7.1... Building unordered-containers-0.2.7.1... Configuring cpphs-1.20.2... Installed th-reify-many-0.1.6 Building cpphs-1.20.2... Configuring blaze-textual-0.2.1.0... Installed unordered-containers-0.2.7.1 Building blaze-textual-0.2.1.0... Configuring th-lift-instances-0.1.11... Installed cpphs-1.20.2 Building th-lift-instances-0.1.11... Configuring scientific-0.3.4.9... Installed blaze-textual-0.2.1.0 Building scientific-0.3.4.9... Installed th-lift-instances-0.1.11 Configuring haskell-src-exts-1.18.2... Building haskell-src-exts-1.18.2... Configuring th-orphans-0.13.3... Installed scientific-0.3.4.9 Building th-orphans-0.13.3... Installed th-orphans-0.13.3 Configuring attoparsec-0.13.1.0... Building attoparsec-0.13.1.0... Installed attoparsec-0.13.1.0 Configuring mysql-simple-0.4.0.0... Building mysql-simple-0.4.0.0... Configuring aeson-1.0.2.1... Installed mysql-simple-0.4.0.0 Building aeson-1.0.2.1... Installed aeson-1.0.2.1 Installed haskell-src-exts-1.18.2 Configuring haskell-src-meta-0.7.0... Building haskell-src-meta-0.7.0... Installed haskell-src-meta-0.7.0 Configuring typedquery-0.1.0.3... Building typedquery-0.1.0.3... Installed typedquery-0.1.0.3 Configuring mysql-simple-typed-0.1.1.0... Building mysql-simple-typed-0.1.1.0... Failed to install mysql-simple-typed-0.1.1.0 Build log ( /home/builder/.cabal/logs/mysql-simple-typed-0.1.1.0.log ): cabal: Entering directory '/tmp/cabal-tmp-25415/mysql-simple-typed-0.1.1.0' Configuring mysql-simple-typed-0.1.1.0... Building mysql-simple-typed-0.1.1.0... Preprocessing library mysql-simple-typed-0.1.1.0... [1 of 3] Compiling Database.MySQL.Simple.DBmoreTH ( src/Database/MySQL/Simple/DBmoreTH.hs, dist/build/Database/MySQL/Simple/DBmoreTH.o ) src/Database/MySQL/Simple/DBmoreTH.hs:34:26: error: • Data constructor not in scope: ClassP :: Name -> [Type] -> b • Perhaps you meant one of these: ‘ClassD’ (imported from Language.Haskell.TH.Syntax), ‘ClassI’ (imported from Language.Haskell.TH.Syntax), ‘Clause’ (imported from Language.Haskell.TH.Syntax) src/Database/MySQL/Simple/DBmoreTH.hs:35: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 pre (loop k ns) [fun ns]] In the expression: do { ns <- replicateM k (newName "a"); let pre = map (\ x -> ...) ns; return [InstanceD pre (loop k ns) [...]] } In an equation for ‘qp’: qp k = do { ns <- replicateM k (newName "a"); let pre = ...; return [InstanceD pre (loop k ns) ...] } where loop 0 ns = AppT (TupleT k) (VarT (head ns)) loop i ns | i < k = AppT (loop (i - 1) ns) (VarT (ns !! i)) | otherwise = AppT (ConT ''QueryParams) (loop (i - 1) ns) fun ns = FunD ('renderParams) [Clause ... (NormalB $ ListE $ map (AppE (VarE ...) . VarE) ns) ...] src/Database/MySQL/Simple/DBmoreTH.hs:35:24: error: • Couldn't match expected type ‘GHC.Base.Maybe Overlap’ with actual type ‘[b1]’ • In the first argument of ‘InstanceD’, namely ‘pre’ In the expression: InstanceD pre (loop k ns) [fun ns] In the first argument of ‘return’, namely ‘[InstanceD pre (loop k ns) [fun ns]]’ src/Database/MySQL/Simple/DBmoreTH.hs:35:29: error: • Couldn't match type ‘Type’ with ‘[Pred]’ Expected type: Cxt Actual type: Type • In the second argument of ‘InstanceD’, namely ‘(loop k ns)’ In the expression: InstanceD pre (loop k ns) [fun ns] In the first argument of ‘return’, namely ‘[InstanceD pre (loop k ns) [fun ns]]’ src/Database/MySQL/Simple/DBmoreTH.hs:35:40: error: • Couldn't match expected type ‘Type’ with actual type ‘[Dec]’ • In the third argument of ‘InstanceD’, namely ‘[fun ns]’ In the expression: InstanceD pre (loop k ns) [fun ns] In the first argument of ‘return’, namely ‘[InstanceD pre (loop k ns) [fun ns]]’ src/Database/MySQL/Simple/DBmoreTH.hs:50:26: error: • Data constructor not in scope: ClassP :: Name -> [Type] -> b • Perhaps you meant one of these: ‘ClassD’ (imported from Language.Haskell.TH.Syntax), ‘ClassI’ (imported from Language.Haskell.TH.Syntax), ‘Clause’ (imported from Language.Haskell.TH.Syntax) src/Database/MySQL/Simple/DBmoreTH.hs:51: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 pre (loop k nsa) [fun nsa nsf nsv fs vs]] In the expression: do { nsa <- replicateM k (newName "a"); nsv <- replicateM k (newName "v"); nsf <- replicateM k (newName "f"); fs <- newName "fs"; .... } In an equation for ‘qr’: qr k = do { nsa <- replicateM k (newName "a"); nsv <- replicateM k (newName "v"); nsf <- replicateM k (newName "f"); .... } where loop 0 ns = AppT (TupleT k) (VarT (head ns)) loop i ns | i < k = AppT (loop (i - 1) ns) (VarT (ns !! i)) | otherwise = AppT (ConT ''QueryResults) (loop (i - 1) ns) fun nsa nsf nsv fs vs = FunD ('convertResults) [Clause ... (NormalB $ TupE $ map VarE nsa) (zipWith3 (\ a f v -> ...) nsa nsf nsv), ....] src/Database/MySQL/Simple/DBmoreTH.hs:51:24: error: • Couldn't match expected type ‘GHC.Base.Maybe Overlap’ with actual type ‘[b0]’ • In the first argument of ‘InstanceD’, namely ‘pre’ In the expression: InstanceD pre (loop k nsa) [fun nsa nsf nsv fs vs] In the first argument of ‘return’, namely ‘[InstanceD pre (loop k nsa) [fun nsa nsf nsv fs vs]]’ src/Database/MySQL/Simple/DBmoreTH.hs:51:29: error: • Couldn't match type ‘Type’ with ‘[Pred]’ Expected type: Cxt Actual type: Type • In the second argument of ‘InstanceD’, namely ‘(loop k nsa)’ In the expression: InstanceD pre (loop k nsa) [fun nsa nsf nsv fs vs] In the first argument of ‘return’, namely ‘[InstanceD pre (loop k nsa) [fun nsa nsf nsv fs vs]]’ src/Database/MySQL/Simple/DBmoreTH.hs:51:41: error: • Couldn't match expected type ‘Type’ with actual type ‘[Dec]’ • In the third argument of ‘InstanceD’, namely ‘[fun nsa nsf nsv fs vs]’ In the expression: InstanceD pre (loop k nsa) [fun nsa nsf nsv fs vs] In the first argument of ‘return’, namely ‘[InstanceD pre (loop k nsa) [fun nsa nsf nsv fs vs]]’ cabal: Leaving directory '/tmp/cabal-tmp-25415/mysql-simple-typed-0.1.1.0' cabal: Error: some packages failed to install: mysql-simple-typed-0.1.1.0 failed during the building phase. The exception was: ExitFailure 1