2012-10-24 18 views
10

Ich habe versucht, haddock durch Ausführen des folgenden Befehls cabal install haddock installieren, aber ich laufe durch das folgende Problem.Wie installiert man Schellfisch mit cabal installieren

[email protected]:~/opt$ cabal install haddock 
Resolving dependencies... 
Configuring haddock-2.11.0... 
Building haddock-2.11.0... 
Preprocessing library haddock-2.11.0... 
unused terminals: 1 
[ 1 of 31] Compiling Haddock.Backends.HaddockDB (src/Haddock/Backends/HaddockDB.hs, dist/build/Haddock/Backends/HaddockDB.o) 
[ 2 of 31] Compiling Haddock.Backends.Xhtml.Types (src/Haddock/Backends/Xhtml/Types.hs, dist/build/Haddock/Backends/Xhtml/Types.o) 
[ 3 of 31] Compiling Haddock.Convert (src/Haddock/Convert.hs, dist/build/Haddock/Convert.o) 
[ 4 of 31] Compiling Paths_haddock (dist/build/autogen/Paths_haddock.hs,  dist/build/Paths_haddock.o) 
[ 5 of 31] Compiling Haddock.GhcUtils (src/Haddock/GhcUtils.hs, dist/build/Haddock/GhcUtils.o) 
[ 6 of 31] Compiling Haddock.Version (src/Haddock/Version.hs, dist/build/Haddock/Version.o) 
[ 7 of 31] Compiling Haddock.Lex  (dist/build/Haddock/Lex.hs, dist/build/Haddock/Lex.o) 
[ 8 of 31] Compiling Haddock.Types (src/Haddock/Types.hs, dist/build/Haddock/Types.o) 
[ 9 of 31] Compiling Haddock.Utils (src/Haddock/Utils.hs, dist/build/Haddock/Utils.o) 
[10 of 31] Compiling Haddock.Options (src/Haddock/Options.hs, dist/build/Haddock/Options.o) 
[11 of 31] Compiling Haddock.Backends.Xhtml.Themes (src/Haddock/Backends/Xhtml/Themes.hs, dist/build/Haddock/Backends/Xhtml/Themes.o) 
[12 of 31] Compiling Haddock.Backends.Xhtml.Utils (src/Haddock/Backends/Xhtml/Utils.hs, dist/build/Haddock/Backends/Xhtml/Utils.o) 
[13 of 31] Compiling Haddock.Backends.LaTeX (src/Haddock/Backends/LaTeX.hs, dist/build/Haddock/Backends/LaTeX.o) 
[14 of 31] Compiling Haddock.Backends.Hoogle (src/Haddock/Backends/Hoogle.hs, dist/build/Haddock/Backends/Hoogle.o) 
[15 of 31] Compiling Haddock.Interface.AttachInstances (src/Haddock/Interface/AttachInstances.hs, dist/build/Haddock/Interface/AttachInstances.o) 
[16 of 31] Compiling Haddock.Interface.Rename (src/Haddock/Interface/Rename.hs, dist/build/Haddock/Interface/Rename.o) 
[17 of 31] Compiling Haddock.Doc  (src/Haddock/Doc.hs, dist/build/Haddock/Doc.o) 
[18 of 31] Compiling Haddock.Parse (dist/build/Haddock/Parse.hs, dist/build/Haddock/Parse.o) 
[19 of 31] Compiling Haddock.Interface.ParseModuleHeader (src/Haddock/Interface/ParseModuleHeader.hs, dist/build/Haddock/Interface/ParseModuleHeader.o) 
[20 of 31] Compiling Haddock.Interface.LexParseRn (src/Haddock/Interface/LexParseRn.hs, dist/build/Haddock/Interface/LexParseRn.o) 

src/Haddock/Interface/LexParseRn.hs:67:52: 
Not in scope: type constructor or class `SafeHaskellMode' 
cabal: Error: some packages failed to install: 
haddock-2.11.0 failed during the building phase. The exception was: 
ExitFailure 1 
[email protected]:~/opt$ 

Gibt es jemanden, der weiß, wie man mit diesem Durcheinander umgeht?

bearbeiten meine ghc Version ist 7.4.1

+0

Welche Version von ghc hast du und wann hast du 'cabal update' zuletzt ausgeführt? – asm

+0

meine Ghc-Version ist '7.4.1' und das letzte Kabale Update wurde jetzt durchgeführt, ohne das Problem zu lösen. –

Antwort

10

Heute ist die Schellfisch Version fest an die Version GHC gebunden. Für ghc-7.4.1 war die entsprechende Schellfischversion 2.10.0.

Der SafeHaskellMode Typ, auf den in der Fehlermeldung verwiesen wird, wurde in ghc-7.4.2 hinzugefügt, so dass Sie Schattock-2.11 nicht mit ghc-7.4.1 kompilieren können.

Sie sollten wahrscheinlich eine Arbeit Schellock-2.10, die mit Ihrem GHC kam. Wenn nicht, können Sie entweder haddock-2.10.0 installieren, oder Sie können Ihr GHC aktualisieren (empfohlen, es gab ein paar Fehler, die seit 7.4.1 behoben wurden).

+1

große Antwort! Lass mich eine kleine Bearbeitung vorschlagen: anstelle von 'cabal install sheddock' solltest du' cabal install haddock-2.10.0' verwenden –

Verwandte Themen