GithubHelp home page GithubHelp logo

cassy's Issues

Build failure with 0.5.1.0.

Building cassy-0.5.1.0...
Preprocessing library cassy-0.5.1.0...
[1 of 6] Compiling Database.Cassandra.Pool ( src/Database/Cassandra/Pool.hs, dist/build/Database/Cassandra/Pool.o )
[2 of 6] Compiling Database.Cassandra.Pack ( src/Database/Cassandra/Pack.hs, dist/build/Database/Cassandra/Pack.o )
[3 of 6] Compiling Database.Cassandra.Types ( src/Database/Cassandra/Types.hs, dist/build/Database/Cassandra/Types.o )
[4 of 6] Compiling Database.Cassandra.Basic ( src/Database/Cassandra/Basic.hs, dist/build/Database/Cassandra/Basic.o )

src/Database/Cassandra/Basic.hs:404:36:
    Couldn't match expected type `lifted-base-0.2.1.0:Control.Exception.Lifted.Handler
                                    m Bool'
                with actual type `MCIO.Handler m0 Bool'
    In the expression: casRetryH
    In the second argument of `recovering', namely
      `[casRetryH, networkRetryH]'
    In the expression: recovering set [casRetryH, networkRetryH] f

src/Database/Cassandra/Basic.hs:404:47:
    Couldn't match expected type `lifted-base-0.2.1.0:Control.Exception.Lifted.Handler
                                    m Bool'
                with actual type `MCIO.Handler m1 Bool'
    In the expression: networkRetryH
    In the second argument of `recovering', namely
      `[casRetryH, networkRetryH]'
    In the expression: recovering set [casRetryH, networkRetryH] f
Failed to install cassy-0.5.1.0
cabal: Error: some packages failed to install:
cassy-0.5.1.0 failed during the building phase. The exception was:
ExitFailure 1

Add upper bound to `errors` dependency

errors-2.0 will be switching to use ExceptT instead of EitherT. If that will break your package, then add an upper bound of errors < 2.0 to your dependencies.

need instance for Bool

instance CasType Bool where
encodeCas i = runPut $ putWord8 (if i then 1 else 0)
decodeCas i = 1 == runGet getWord8 i

perhaps there's a better way, I'm not sure.

Dependency problem with network-uri

I got

src/Thrift/Transport/HttpClient.hs:28:8:
    Could not find module ‘Network.URI’
    It is a member of the hidden package ‘network-uri-2.6.0.3@7wV1dpAdN91FDn2A3qFHGv’.
    Perhaps you need to add ‘network-uri’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
Thrift-0.6.0 failed during the building phase. The exception was:
ExitFailure 1
cassandra-thrift-0.8.5.1 depends on Thrift-0.6.0 which failed to install.
cassy-0.7.1 depends on Thrift-0.6.0 which failed to install.
cassy-test-0.1.0.0 depends on Thrift-0.6.0 which failed to install.

rror while building even I fetched network-uri 2.6.0.3 using cabal fetch manually.

No instance for (MonadCassandra IO)

Hello

I cannot connect to Cassandra by your usage.
The code is below.

I got an error message.

If you have a better usage.
Please share...

===error===============================
No instance for (B.MonadCassandra IO)
arising from a use of `B.insert'
Possible fix: add an instance declaration for (B.MonadCassandra IO)

===code===============================

import qualified Database.Cassandra.Basic as B
import qualified Database.Cassandra.Types as T
import qualified Data.ByteString.Char8 as U
import qualified Data.ByteString.Lazy.Internal as P

defServer = ("...",9160)
defServers = [defServer]

key = P.Chunk (U.pack "key1") P.Empty
myCol = P.Chunk (U.pack "col1") P.Empty
myVal = P.Chunk (U.pack "val1") P.Empty

test :: IO ()
test = do
putStrLn "test"
pool <- B.createCassandraPool defServers 3 300 3 "DEMO"
B.insert "SampleColumnFamily" key B.QUORUM [B.col myCol myVal]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.