2014-12-24 8 views
3

:GHC-모드 MonadBaseControl이`대신 StT` 관련 유형 '의 StM` 관련 newtype은이 기대 나는 샌드 박스에 Hackage에서 최신 GHC-모드 (5.2.1.1)를 설치에서이 오류를 받고 있어요

[15 of 38] Compiling Language.Haskell.GhcMod.CabalConfig (Language/Haskell/GhcMod/CabalConfig.hs, dist/dist-sandbox-94286619/build/Language/Haskell/GhcMod/CabalConfig.o) 
[16 of 38] Compiling Language.Haskell.GhcMod.CabalApi (Language/Haskell/GhcMod/CabalApi.hs, dist/dist-sandbox-94286619/build/Language/Haskell/GhcMod/CabalApi.o) 
[17 of 38] Compiling Language.Haskell.GhcMod.Cradle (Language/Haskell/GhcMod/Cradle.hs, dist/dist-sandbox-94286619/build/Language/Haskell/GhcMod/Cradle.o) 
[18 of 38] Compiling Language.Haskell.GhcMod.Monad (Language/Haskell/GhcMod/Monad.hs, dist/dist-sandbox-94286619/build/Language/Haskell/GhcMod/Monad.o) 

Language/Haskell/GhcMod/Monad.hs:370:5: 
    Wrong category of family instance; declaration was for a type synonym 
    In the newtype instance declaration for ‘StM’ 
    In the instance declaration for ‘MonadBaseControl IO (GhcModT m)’ 
cabal: Error: some packages failed to install: 
ghc-mod-5.2.1.1 failed during the building phase. The exception was: 
ExitFailure 1 

전에이 오류를 본 적이 없으므로 파고갔습니다. 당신이 at monad-control이 Hackage에 는 그런StM 관련 newtype은, 그러나 만 StT 관련 유형이없는 보면

instance (MonadBaseControl IO m) => MonadBaseControl IO (GhcModT m) where 
    newtype StM (GhcModT m) a = StGhcMod { 
      unStGhcMod :: StM (StateT GhcModState 
           (ErrorT GhcModError 
           (JournalT GhcModLog 
            (ReaderT GhcModEnv m)))) a } 
    liftBaseWith f = GhcModT . liftBaseWith $ \runInBase -> 
     f $ liftM StGhcMod . runInBase . unGhcModT 

: Language/Haskell/GhcMod/Monad.hs에서 확인 충분히 재미 뭔가를하고 있어요.

다른 유형의 속임수가 여기에없는 한, 나는 혼란 스럽습니다. 이 문제가 어떻게 수정 되었습니까? 고맙습니다.

답변

3

이 부분을 스크래치하면 내 눈이 나를 속이고 있습니다. 내 실수는, monad-control-1.x 이후로 MonadControl은 here과 같이 관련 데이터 유형 대신 연관된 유형을가집니다.

+0

이 문제를 수정하거나 해결할 수있는 방법이 있습니까? 나는 그냥 하스켈을 시작했고, 이것 때문에 ghc-mod를 설치할 수 없다. 내가 무엇을 할 수 있을지? – jchitel

+4

아. 그것을 알아 냈다. 나는'cabal install ghc-mod --constraint = '모나드 컨트롤 <1.0.0.0''을 실행 시켰습니다. – jchitel