昨日、Haskellでモジュールをインストールするために、カスル経由でHaskellモジュールをインストールしようとしました。まずキャバールをインストールしなければならなかった。Windows 7にHaskellモジュールをインストールする
マイシステム:Windows 7
Haskellのコンパイラのバージョン:GHC 7.0.2(リンクhttp://www.haskell.org/ghc/download)
カバル:http://haskell.org/cabal/download.html
私はあなたがかもしれないことを期待して、ステップによるプロセスステップを説明しますキャバールとキャバルを使ったパッケージのインストールの両方で間違ったことを指定してください。
手順:
は、Windows 7のスタートメニューから、GHCiのそれを起動するHaskellのコンパイラGHC 7.0.2
をインストールは、DOSウィンドウで次のような出力が得られます。
GHCi, version 7.0.2: Website :? for help . Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package ffi-1.0 ... linking ... done. Prelude>
これまでのところとても良い:基本パッケージ内のすべての関数はアクセス可能で、それが想定していた通りに機能します。
結論:GHCiインストールには誤った手順が含まれていません。
(導入参照)ソースから
cabal.exe
ダウンロードは、Cにそれをコピーした:(%パス% - 変数に追加される)\ GHC \ GHC-7.0.2 \ビン- サイトがアドバイスとして
cabal-install-0.8.2.tar.gz
ダウンロードクリーンインストールにはパッケージが必要です。 - オープン新しいDOSプロンプトウィンドウ
- 型付き
cabal update
(サイトの助言として)、それはリストを更新しましたし、ユーザープロンプトモードに戻ります - 型付き
cd C:\pathwhere\cabal-install-0.8.2.tar.gz
は(徒党インストールファイルがあるディレクトリに切り替え)
、
簡単に見ることができるように、出力にはいくつかのエラーが示されていますが、その意味が分かりません。私はドス・ボックスの入力プロンプトで再びステップ1.
からドス・Interpeterにそれがフィットネスエクササイズすることに焦点を当て、私の代数パッケージをインストールしようとして続けて、私はこの出力を作成したこと、
cabal install constructive-algebra
を入力:Resolving dependencies... cabal: cannot configure algebra-0.0.0.1. It requires base >=3.0 && <4.1 For the dependency on base >=3.0 && <4.1 there are these packages: base-3.0.3.1, base-3.0.3.2 and base-4.0.0.0. However none of them are available. base-3.0.3.1 was excluded because of the top level dependency base -any base-3.0.3.2 was excluded because of the top level dependency base -any base-4.0.0.0 was excluded because of the top level dependency base -any
Resolving dependencies...
Downloading containers-0.3.0.0...
Configuring containers-0.3.0.0...
Preprocessing library containers-0.3.0.0...
Building containers-0.3.0.0...
[1 of 7] Compiling Data.Sequence (Data\Sequence.hs, dist\build\Data\Sequence.o)
[2 of 7] Compiling Data.Set (Data\Set.hs, dist\build\Data\Set.o)
[3 of 7] Compiling Data.Map (Data\Map.hs, dist\build\Data\Map.o)
[4 of 7] Compiling Data.IntSet (Data\IntSet.hs, dist\build\Data\IntSet.o)
[5 of 7] Compiling Data.IntMap (Data\IntMap.hs, dist\build\Data\IntMap.o)
[6 of 7] Compiling Data.Tree (Data\Tree.hs, dist\build\Data\Tree.o)
[7 of 7] Compiling Data.Graph (Data\Graph.hs, dist\build\Data\Graph.o)
cabal: ar is required but it could not be found.
Downloading filepath-1.1.0.4...
Configuring filepath-1.1.0.4...
Preprocessing library filepath-1.1.0.4...
Building filepath-1.1.0.4...
[1 of 3] Compiling System.FilePath.Posix (System\FilePath\Posix.hs, dist\build\System\FilePath\Posix.o)
[2 of 3] Compiling System.FilePath.Windows (System\FilePath\Windows.hs, dist\build\System\FilePath\Windows.o)
[3 of 3] Compiling System.FilePath (System\FilePath.hs, dist\build\System\FilePath.o)
cabal: ar is required but it could not be found.
Downloading parsec-2.1.0.1...
Configuring parsec-2.1.0.1...
Preprocessing library parsec-2.1.0.1...
Building parsec-2.1.0.1...
[ 1 of 10] Compiling Text.ParserCombinators.Parsec.Pos (Text\ParserCombinators\Parsec\Pos.hs, dist\build\Text\ParserCombinators\Parsec\Pos.o)
[ 2 of 10] Compiling Text.ParserCombinators.Parsec.Error (Text\ParserCombinators\Parsec\Error.hs, dist\build\Text\ParserCombinators\Parsec\Error.o)
[ 3 of 10] Compiling Text.ParserCombinators.Parsec.Prim (Text\ParserCombinators\Parsec\Prim.hs, dist\build\Text\ParserCombinators\Parsec\Prim.o)
[ 4 of 10] Compiling Text.ParserCombinators.Parsec.Char (Text\ParserCombinators\Parsec\Char.hs, dist\build\Text\ParserCombinators\Parsec\Char.o)
[ 5 of 10] Compiling Text.ParserCombinators.Parsec.Combinator (Text\ParserCombinators\Parsec\Combinator.hs, dist\build\Text\ParserCombinators\Parsec\Combinator.o)
[ 6 of 10] Compiling Text.ParserCombinators.Parsec.Expr (Text\ParserCombinators\Parsec\Expr.hs, dist\build\Text\ParserCombinators\Parsec\Expr.o)
[ 7 of 10] Compiling Text.ParserCombinators.Parsec (Text\ParserCombinators\Parsec.hs, dist\build\Text\ParserCombinators\Parsec.o)
[ 8 of 10] Compiling Text.ParserCombinators.Parsec.Token (Text\ParserCombinators\Parsec\Token.hs, dist\build\Text\ParserCombinators\Parsec\Token.o)
[ 9 of 10] Compiling Text.ParserCombinators.Parsec.Perm (Text\ParserCombinators\Parsec\Perm.hs, dist\build\Text\ParserCombinators\Parsec\Perm.o)
[10 of 10] Compiling Text.ParserCombinators.Parsec.Language (Text\ParserCombinators\Parsec\Language.hs, dist\build\Text\ParserCombinators\Parsec\Language.o)
cabal: ar is required but it could not be found.
Downloading time-1.1.4...
[1 of 1] Compiling Main (C:\Users\altug\AppData\Local\Temp\time-1.1.43528time-1.1.4\Setup.hs, C:\Users\altug\AppData\Local\Temp\time-1.1.43528\time-1.1.4\dist\setup\Main.o)
C:\Users\altug\AppData\Local\Temp\time-1.1.43528\time-1.1.4\Setup.hs:5:1:
Warning: In the use of `runTests'
(imported from Distribution.Simple, but defined in Distribution.Simple.UserHooks):
Deprecated: "Please use the new testing interface instead!"
Linking C:\Users\altug\AppData\Local\Temp\time-1.1.43528\time-1.1.4\dist\setup\setup.exe ...
Configuring time-1.1.4...
Preprocessing library time-1.1.4...
Building time-1.1.4...
[ 1 of 24] Compiling Data.Time.Clock.CTimeval (Data\Time\Clock\CTimeval.hs, dist\build\Data\Time\Clock\CTimeval.o)
[ 2 of 24] Compiling Data.Time.Clock.Scale (Data\Time\Clock\Scale.hs, dist\build\Data\Time\Clock\Scale.o)
[ 3 of 24] Compiling Data.Time.Calendar.Private (Data\Time\Calendar\Private.hs, dist\build\Data\Time\Calendar\Private.o)
[ 4 of 24] Compiling Data.Time.Calendar.MonthDay (Data\Time\Calendar\MonthDay.hs, dist\build\Data\Time\Calendar\MonthDay.o)
[ 5 of 24] Compiling Data.Time.Calendar.Days (Data\Time\Calendar\Days.hs, dist\build\Data\Time\Calendar\Days.o)
[ 6 of 24] Compiling Data.Time.Calendar.OrdinalDate (Data\Time\Calendar\OrdinalDate.hs, dist\build\Data\Time\Calendar\OrdinalDate.o)
[ 7 of 24] Compiling Data.Time.Calendar.Gregorian (Data\Time\Calendar\Gregorian.hs, dist\build\Data\Time\Calendar\Gregorian.o)
[ 8 of 24] Compiling Data.Time.Calendar.WeekDate (Data\Time\Calendar\WeekDate.hs, dist\build\Data\Time\Calendar\WeekDate.o)
[ 9 of 24] Compiling Data.Time.Calendar.JulianYearDay (Data\Time\Calendar\JulianYearDay.hs, dist\build\Data\Time\Calendar\JulianYearDay.o)
[10 of 24] Compiling Data.Time.Calendar.Julian (Data\Time\Calendar\Julian.hs, dist\build\Data\Time\Calendar\Julian.o)
[11 of 24] Compiling Data.Time.Clock.UTC (Data\Time\Clock\UTC.hs, dist\build\Data\Time\Clock\UTC.o)
[12 of 24] Compiling Data.Time.Clock.POSIX (Data\Time\Clock\POSIX.hs, dist\build\Data\Time\Clock\POSIX.o)
[13 of 24] Compiling Data.Time.Clock.UTCDiff (Data\Time\Clock\UTCDiff.hs, dist\build\Data\Time\Clock\UTCDiff.o)
[14 of 24] Compiling Data.Time.Clock (Data\Time\Clock.hs, dist\build\Data\Time\Clock.o)
[15 of 24] Compiling Data.Time.LocalTime.TimeZone (Data\Time\LocalTime\TimeZone.hs, dist\build\Data\Time\LocalTime\TimeZone.o)
[16 of 24] Compiling Data.Time.LocalTime.TimeOfDay (Data\Time\LocalTime\TimeOfDay.hs, dist\build\Data\Time\LocalTime\TimeOfDay.o)
[17 of 24] Compiling Data.Time.Calendar (Data\Time\Calendar.hs, dist\build\Data\Time\Calendar.o)
[18 of 24] Compiling Data.Time.Calendar.Easter (Data\Time\Calendar\Easter.hs, dist\build\Data\Time\Calendar\Easter.o)
[19 of 24] Compiling Data.Time.LocalTime.LocalTime (Data\Time\LocalTime\LocalTime.hs, dist\build\Data\Time\LocalTime\LocalTime.o)
[20 of 24] Compiling Data.Time.LocalTime (Data\Time\LocalTime.hs, dist\build\Data\Time\LocalTime.o)
[21 of 24] Compiling Data.Time.Clock.TAI (Data\Time\Clock\TAI.hs, dist\build\Data\Time\Clock\TAI.o)
[22 of 24] Compiling Data.Time.Format.Parse (Data\Time\Format\Parse.hs, dist\build\Data\Time\Format\Parse.o)
[23 of 24] Compiling Data.Time.Format (Data\Time\Format.hs, dist\build\Data\Time\Format.o)
[24 of 24] Compiling Data.Time (Data\Time.hs, dist\build\Data\Time.o)
Registering time-1.1.4...
Installing library in
C:\Users\altug\AppData\Roaming\cabal\time-1.1.4\ghc-7.0.2
Registering time-1.1.4...
Downloading random-1.0.0.3...
Configuring random-1.0.0.3...
Preprocessing library random-1.0.0.3...
Building random-1.0.0.3...
[1 of 1] Compiling System.Random (System\Random.hs, dist\build\System\Random.o)
cabal: ar is required but it could not be found.
Downloading transformers-0.2.2.0...
Configuring transformers-0.2.2.0...
Preprocessing library transformers-0.2.2.0...
Building transformers-0.2.2.0...
[ 1 of 21] Compiling Data.Functor.Product (Data\Functor\Product.hs, dist\buildData\Functor\Product.o)
[ 2 of 21] Compiling Data.Functor.Constant (Data\Functor\Constant.hs, dist\build\Data\Functor\Constant.o)
[ 3 of 21] Compiling Data.Functor.Compose (Data\Functor\Compose.hs, dist\build\Data\Functor\Compose.o)
[ 4 of 21] Compiling Data.Functor.Identity (Data\Functor\Identity.hs, dist\build\Data\Functor\Identity.o)
[ 5 of 21] Compiling Control.Monad.Trans.Class (Control\Monad\Trans\Class.hs, dist\build\Control\Monad\Trans\Class.o)
[ 6 of 21] Compiling Control.Monad.IO.Class (Control\Monad\IO\Class.hs, dist\build\Control\Monad\IO\Class.o)
[ 7 of 21] Compiling Control.Monad.Trans.Cont (Control\Monad\Trans\Cont.hs, dist\build\Control\Monad\Trans\Cont.o)
[ 8 of 21] Compiling Control.Monad.Trans.Error (Control\Monad\Trans\Error.hs, dist\build\Control\Monad\Trans\Error.o)
[ 9 of 21] Compiling Control.Monad.Trans.Identity (Control\Monad\Trans\Identity.hs, dist\build\Control\Monad\Trans\Identity.o)
[10 of 21] Compiling Control.Monad.Trans.List (Control\Monad\Trans\List.hs, dist\build\Control\Monad\Trans\List.o)
[11 of 21] Compiling Control.Monad.Trans.Maybe (Control\Monad\Trans\Maybe.hs, dist\build\Control\Monad\Trans\Maybe.o)
[12 of 21] Compiling Control.Monad.Trans.Reader (Control\Monad\Trans\Reader.hs, dist\build\Control\Monad\Trans\Reader.o)
[13 of 21] Compiling Control.Monad.Trans.RWS.Lazy (Control\Monad\Trans\RWS\Lazy.hs, dist\build\Control\Monad\Trans\RWS\Lazy.o)
[14 of 21] Compiling Control.Monad.Trans.RWS (Control\Monad\Trans\RWS.hs, dist\build\Control\Monad\Trans\RWS.o)
[15 of 21] Compiling Control.Monad.Trans.RWS.Strict (Control\Monad\Trans\RWS\Strict.hs, dist\build\Control\Monad\Trans\RWS\Strict.o)
[16 of 21] Compiling Control.Monad.Trans.State.Lazy (Control\Monad\Trans\State\Lazy.hs, dist\build\Control\Monad\Trans\State\Lazy.o)
[17 of 21] Compiling Control.Monad.Trans.State (Control\Monad\Trans\State.hs, dist\build\Control\Monad\Trans\State.o)
[18 of 21] Compiling Control.Monad.Trans.State.Strict (Control\Monad\Trans\State\Strict.hs, dist\build\Control\Monad\Trans\State\Strict.o)
[19 of 21] Compiling Control.Monad.Trans.Writer.Lazy (Control\Monad\Trans\Writer\Lazy.hs, dist\build\Control\Monad\Trans\Writer\Lazy.o)
[20 of 21] Compiling Control.Monad.Trans.Writer (Control\Monad\Trans\Writer.hs, dist\build\Control\Monad\Trans\Writer.o)
[21 of 21] Compiling Control.Monad.Trans.Writer.Strict (Control\Monad\Trans\Writer\Strict.hs, dist\build\Control\Monad\Trans\Writer\Strict.o)
cabal: ar is required but it could not be found.
Downloading zlib-0.5.3.1...
Configuring zlib-0.5.3.1...
Preprocessing library zlib-0.5.3.1...
Building zlib-0.5.3.1...
[1 of 5] Compiling Codec.Compression.Zlib.Stream (dist\build\Codec\Compression\Zlib\Stream.hs, dist\build\Codec\Compression\Zlib\Stream.o)
[2 of 5] Compiling Codec.Compression.Zlib.Internal (Codec\Compression\Zlib\Internal.hs, dist\build\Codec\Compression\Zlib\Internal.o)
[3 of 5] Compiling Codec.Compression.Zlib.Raw (Codec\Compression\Zlib\Raw.hs, dist\build\Codec\Compression\Zlib\Raw.o)
[4 of 5] Compiling Codec.Compression.Zlib (Codec\Compression\Zlib.hs, dist\build\Codec\Compression\Zlib.o)
[5 of 5] Compiling Codec.Compression.GZip (Codec\Compression\GZip.hs, dist\build\Codec\Compression\GZip.o)
cabal: ar is required but it could not be found.
cabal: Error: some packages failed to install:
Cabal-1.8.0.6 depends on filepath-1.1.0.4 which failed to install.
HTTP-4000.1.1 depends on transformers-0.2.2.0 which failed to install.
cabal-install-0.8.2 depends on zlib-0.5.3.1 which failed to install.
containers-0.3.0.0 failed during the building phase. The exception was:
ExitFailure 1
directory-1.0.1.2 depends on filepath-1.1.0.4 which failed to install.
filepath-1.1.0.4 failed during the building phase. The exception was:
ExitFailure 1
mtl-2.0.1.0 depends on transformers-0.2.2.0 which failed to install.
network-2.3.0.2 depends on parsec-2.1.0.1 which failed to install.
parsec-2.1.0.1 failed during the building phase. The exception was:
ExitFailure 1
process-1.0.1.5 depends on filepath-1.1.0.4 which failed to install.
random-1.0.0.3 failed during the building phase. The exception was:
ExitFailure 1
transformers-0.2.2.0 failed during the building phase. The exception was:
ExitFailure 1
zlib-0.5.3.1 failed during the building phase. The exception was:
ExitFailure 1
私の結論:
をその後インストールがドス・ボックスで、次の出力の作成を開始cabal install cabal-install-0.8.2
型付き
私は、パッケージがインストールされていないと思います。説明できる人が必要です。モジュールを稼働させるためにはどのようなステップが必要ですか?
この投稿を読んでいただきありがとうございました。私の理解を深め、インタプリタとコンパイラの動作を理解してくれてありがとうございます。
私はそれを試してみましょう。しかし、DOSコマンドプロンプトでカバールを使用しているのですか、それとも何とかHaskell Verisonに組み込まれていますか? – kiltek
Haskell-Plattformでうまく動作します。しかし、モジュールの名前は何ですか?私はインタプリタにロードしたいのですか?ちょうど ":load algebra"は動作しません! – kiltek
パッケージのルートを取得するには、ghciの 'Import Algebra'と言ってください。 すべてのパッケージに関する詳細は、http://hackage.haskell.org/package/constructive-algebraにあります。 – Ezra