haskelldb icon indicating copy to clipboard operation
haskelldb copied to clipboard

How to use `haskelldb` as a library?

Open nurdann opened this issue 7 months ago • 4 comments

After running cabal init I tried adding haskelldb to .cabal file, e.g.

    build-depends:    
        base,
        haskelldb

But cannot cabal build

$ cabal build | tail
Error: cabal: Failed to build haskelldb-2.2.4 (which is required by
exe:smart-query from smart-query-0.1.0.0). See the build log above for
details.

    It could refer to
       either ‘Prelude.<>’,
              imported from ‘Prelude’ at src/Database/HaskellDB/Sql/Print.hs:15:8-35
              (and originally defined in ‘GHC.Base’)
           or ‘Text.PrettyPrint.HughesPJ.<>’,
              imported from ‘Text.PrettyPrint.HughesPJ’ at src/Database/HaskellDB/Sql/Print.hs:28:1-32
    |
186 |       CastSqlExpr typ expr -> text "CAST" <> parens (ppSqlExpr expr <+> text "AS" <+> text typ)
    |                                           ^^
[27 of 27] Compiling Database.HaskellDB.Version ( src/Database/HaskellDB/Version.hs, dist/build/Database/HaskellDB/Version.o, dist/build/Database/HaskellDB/Version.dyn_o )

nurdann avatar Jul 21 '24 06:07 nurdann