尽管出现这些错误,我如何安装elm-repl?

问题描述

我对Elm和Web开发是全新的。我正在阅读指南here。我installed Sublime Textelm compiler。我想使用REPL轻松地玩转游戏。我尝试通过说明here安装该文件,并在其中运行:

cabal update ; cabal install elm-repl

但是我得到这个错误

Resolving dependencies...
Configuring http-client-0.5.8...
Building http-client-0.5.8...
Failed to install http-client-0.5.8
Build log ( /home/matt/.cabal/logs/http-client-0.5.8.log ):
cabal: Entering directory '/tmp/cabal-tmp-9068/http-client-0.5.8'
Configuring http-client-0.5.8...
Building http-client-0.5.8...
Preprocessing library http-client-0.5.8...
[ 1 of 19] Compiling Network.PublicSuffixList.Types ( publicsuffixlist/Network/PublicSuffixList/Types.hs,dist/build/Network/PublicSuffixList/Types.o )
[ 2 of 19] Compiling Network.PublicSuffixList.Serialize ( publicsuffixlist/Network/PublicSuffixList/Serialize.hs,dist/build/Network/PublicSuffixList/Serialize.o )
[ 3 of 19] Compiling Network.PublicSuffixList.DataStructure ( publicsuffixlist/Network/PublicSuffixList/DataStructure.hs,dist/build/Network/PublicSuffixList/DataStructure.o )
[ 4 of 19] Compiling Network.PublicSuffixList.Lookup ( publicsuffixlist/Network/PublicSuffixList/Lookup.hs,dist/build/Network/PublicSuffixList/Lookup.o )
[ 5 of 19] Compiling Network.HTTP.Client.Util ( Network/HTTP/Client/Util.hs,dist/build/Network/HTTP/Client/Util.o )
[ 6 of 19] Compiling Data.KeyedPool   ( Data/KeyedPool.hs,dist/build/Data/KeyedPool.o )
[ 7 of 19] Compiling Network.HTTP.Client.Types ( Network/HTTP/Client/Types.hs,dist/build/Network/HTTP/Client/Types.o )
[ 8 of 19] Compiling Network.HTTP.Client.Connection ( Network/HTTP/Client/Connection.hs,dist/build/Network/HTTP/Client/Connection.o )
[ 9 of 19] Compiling Network.HTTP.Client.Body ( Network/HTTP/Client/Body.hs,dist/build/Network/HTTP/Client/Body.o )
[10 of 19] Compiling Network.HTTP.Client.Cookies ( Network/HTTP/Client/Cookies.hs,dist/build/Network/HTTP/Client/Cookies.o )

Network/HTTP/Client/Cookies.hs:152:38: error:
    • Couldn't match expected type ‘Builder’
                  with actual type ‘Data.ByteString.Builder.Internal.Builder’
      NB: ‘Data.ByteString.Builder.Internal.Builder’
            is defined in ‘Data.ByteString.Builder.Internal’
                in package ‘bytestring-0.10.8.1’
          ‘Builder’
            is defined in ‘Blaze.ByteString.Builder.Internal.Types’
                in package ‘blaze-builder-0.3.3.4’
    • In the second argument of ‘($)’,namely
        ‘renderCookies $ output_cookies’
      In the expression: toByteString $ renderCookies $ output_cookies
      In an equation for ‘output_line’:
          output_line = toByteString $ renderCookies $ output_cookies
cabal: Leaving directory '/tmp/cabal-tmp-9068/http-client-0.5.8'
cabal: Error: some packages Failed to install:
Elm-0.12.3 depends on http-client-0.5.8 which Failed to install.
elm-repl-0.2.2.1 depends on http-client-0.5.8 which Failed to install.
http-client-0.5.8 Failed during the building phase. The exception was:
ExitFailure 1
http-client-tls-0.3.5.3 depends on http-client-0.5.8 which Failed to install.
pandoc-2.1 depends on http-client-0.5.8 which Failed to install.

解决方法

如果您已经安装了Elm编译器,那么您已经有了REPL。尝试在外壳程序中输入elm repl。请注意,此命令中没有连字符。

您遵循的安装独立REPL的说明已过时。