3

cabalファイルやLogin.hsで何を変更する必要がありますか?このパッケージの他の.hsファイルには、異なるコンジットバージョンが必要であることに注意してください。

(src https://github.com/gertcuykens/haskell-design

gert@couchdb:~/Downloads/haskell-design/src$ ghci Chat.hs 
GHCi, version 7.4.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 2] Compiling Login            ( Login.hs, interpreted )

Login.hs:27:9:
    No instance for (Control.Monad.Trans.Control.MonadBaseControl
                       IO m0)
      arising from a use of `withManager'
    Possible fix:
      add an instance declaration for
      (Control.Monad.Trans.Control.MonadBaseControl IO m0)
    In the expression: withManager
    In the expression:
      withManager
      $ \ manager
          -> FB.runFacebookT app manager
             $ FB.getUserAccessTokenStep1 url perms
    In an equation for `fbUrl':
        fbUrl
          = withManager
            $ \ manager
                -> FB.runFacebookT app manager
                   $ FB.getUserAccessTokenStep1 url perms

Login.hs:27:55:
    Couldn't match expected type `http-conduit-1.4.1.8:Network.HTTP.Conduit.Manager.Manager'
                with actual type `http-conduit-1.5.0.3:Network.HTTP.Conduit.Manager.Manager'
    In the second argument of `FB.runFacebookT', namely `manager'
    In the expression: FB.runFacebookT app manager
    In the expression:
      FB.runFacebookT app manager $ FB.getUserAccessTokenStep1 url perms

Login.hs:31:13:
    No instance for (Control.Monad.Trans.Control.MonadBaseControl
                       IO m1)
      arising from a use of `withManager'
    Possible fix:
      add an instance declaration for
      (Control.Monad.Trans.Control.MonadBaseControl IO m1)
    In the expression: withManager
    In the expression:
      withManager
      $ \ manager
          -> FB.runFacebookT app manager
             $ do { t <- FB.getUserAccessTokenStep2 url [...];
                    u <- FB.getUser "me" [] (Just t);
                    .... }
    In an equation for `fbEmail':
        fbEmail c
          = withManager
            $ \ manager
                -> FB.runFacebookT app manager
                   $ do { t <- FB.getUserAccessTokenStep2 url ...;
                          .... }

Login.hs:31:59:
    Couldn't match expected type `http-conduit-1.4.1.8:Network.HTTP.Conduit.Manager.Manager'
                with actual type `http-conduit-1.5.0.3:Network.HTTP.Conduit.Manager.Manager'
    In the second argument of `FB.runFacebookT', namely `manager'
    In the expression: FB.runFacebookT app manager
    In the expression:
      FB.runFacebookT app manager
      $ do { t <- FB.getUserAccessTokenStep2 url [c];
             u <- FB.getUser "me" [] (Just t);
             return $ FB.userEmail u }

Login.hs:37:12:
    No instance for (Control.Monad.Trans.Control.MonadBaseControl
                       IO m2)
      arising from a use of `withManager'
    Possible fix:
      add an instance declaration for
      (Control.Monad.Trans.Control.MonadBaseControl IO m2)
    In the expression: withManager
    In the expression:
      withManager
      $ \ manager
          -> FB.runFacebookT app manager
             $ do { t <- FB.getUserAccessTokenStep2 url [...];
                    u <- FB.getUser "me" [] (Just t);
                    .... }
    In an equation for `fbName':
        fbName c
          = withManager
            $ \ manager
                -> FB.runFacebookT app manager
                   $ do { t <- FB.getUserAccessTokenStep2 url ...;
                          .... }

Login.hs:37:58:
    Couldn't match expected type `http-conduit-1.4.1.8:Network.HTTP.Conduit.Manager.Manager'
                with actual type `http-conduit-1.5.0.3:Network.HTTP.Conduit.Manager.Manager'
    In the second argument of `FB.runFacebookT', namely `manager'
    In the expression: FB.runFacebookT app manager
    In the expression:
      FB.runFacebookT app manager
      $ do { t <- FB.getUserAccessTokenStep2 url [c];
             u <- FB.getUser "me" [] (Just t);
             return $ FB.userName u }
Failed, modules loaded: none.
Prelude> 
4

1 に答える 1

1

cabal-file でバージョンを指定し、cabal-dev ghci を使用できます (cabal-dev を使用する場合)。

また、同じパッケージの 2 つのバージョンを使用することはできませんが、あなたの場合はfbgithub から使用できます。

$ git clone https://github.com/snoyberg/fb.git
$ cd fb
$ cabal install fb.cabal
于 2012-08-05T19:36:09.433 に答える