Cabal 파일 및 Login.hs에서 무엇을 변경해야합니까? 이 패키지의 다른 .hs 파일에는 다른 conduit 버전이 필요합니다.동일한 패키지의 두 버전을 사용하려면 어떻게해야합니까?
(SRC https://github.com/gertcuykens/haskell-design)
[email protected]:~/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>
당신은'HTTP-conduit'의 동일한 버전을 사용하는 모든 코드를 변환 할 수 있을까요? – huon
'ghc-pkg check'을 실행하면 두 개의 도관 버전으로 인해 여러 개의 패키지가 손상되었을 수 있습니다. 어쨌든 동일한 패키지의 여러 버전에 따라 패키지를 빌드하는 것이 가능하다면 그렇게하는 것이 바람직하지 않습니다. 동일한 콘딧 버전에 대한 모든 종속성을 구축해야합니다. –
'ghc-pkg check'만이이 물건들을 할당 해줍니다. 경고 : haddock-interfaces : /home/gert/.cabal/share/doc/happstack-lite-7.2.0/html/happstack-lite.haddock doesn ' t 존재하거나 파일이 아닙니다' –