我在我的系统上安装HaXml遇到了麻烦。
我已经安装了Haskell平台并使用了以下链接提供的clang-wrapper补丁:http://www.haskell.org/platform/mac.html 当我尝试运行
我已经安装了Haskell平台并使用了以下链接提供的clang-wrapper补丁:http://www.haskell.org/platform/mac.html 当我尝试运行
cabal install HaXml
时,我会得到以下错误。我已经尽力进行了一些研究,但仍然无法解决这个问题。我甚至尝试了在此链接http://hackage.haskell.org/package/HaXml中找到的依赖项,然后尝试安装软件包,但仍然没有成功。我在终端中收到以下错误消息:Resolving dependencies...
Configuring HaXml-1.24...
/var/folders/m0/w93djnj57fv4wynyrjf4lgxc0000gn/T/23529.c:1:12:
warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
^
1 warning generated.
Building HaXml-1.24...
Preprocessing library HaXml-1.24...
[ 1 of 42] Compiling Text.XML.HaXml.Xtract.Lex ( src/Text/XML/HaXml/Xtract/Lex.hs, dist/build/Text/XML/HaXml/Xtract/Lex.o )
[ 2 of 42] Compiling Text.XML.HaXml.DtdToHaskell.TypeDef ( src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs, dist/build/Text/XML/HaXml/DtdToHaskell/TypeDef.o )
[ 3 of 42] Compiling Text.XML.HaXml.DtdToHaskell.Instance ( src/Text/XML/HaXml/DtdToHaskell/Instance.hs, dist/build/Text/XML/HaXml/DtdToHaskell/Instance.o )
[ 4 of 42] Compiling Text.XML.HaXml.Posn ( src/Text/XML/HaXml/Posn.hs, dist/build/Text/XML/HaXml/Posn.o )
[ 5 of 42] Compiling Text.XML.HaXml.Lex ( src/Text/XML/HaXml/Lex.hs, dist/build/Text/XML/HaXml/Lex.o )
[ 6 of 42] Compiling Text.XML.HaXml.Types ( src/Text/XML/HaXml/Types.hs, dist/build/Text/XML/HaXml/Types.o )
[ 7 of 42] Compiling Text.XML.HaXml.Namespaces ( src/Text/XML/HaXml/Namespaces.hs, dist/build/Text/XML/HaXml/Namespaces.o )
[ 8 of 42] Compiling Text.XML.HaXml.Schema.XSDTypeModel ( src/Text/XML/HaXml/Schema/XSDTypeModel.hs, dist/build/Text/XML/HaXml/Schema/XSDTypeModel.o )
src/Text/XML/HaXml/Schema/XSDTypeModel.hs:305:19: Warning:
Fields of `Schema' not initialised: schema_elementFormDefault,
schema_attributeFormDefault, schema_finalDefault,
schema_blockDefault, schema_targetNamespace, schema_version,
schema_namespaces
In the expression: Schema {schema_items = []}
In an equation for `mempty': mempty = Schema {schema_items = []}
In the instance declaration for `Monoid Schema'
[ 9 of 42] Compiling Text.XML.HaXml.Schema.PrimitiveTypes ( src/Text/XML/HaXml/Schema/PrimitiveTypes.hs, dist/build/Text/XML/HaXml/Schema/PrimitiveTypes.o )
[10 of 42] Compiling Text.XML.HaXml.Verbatim ( src/Text/XML/HaXml/Verbatim.hs, dist/build/Text/XML/HaXml/Verbatim.o )
[11 of 42] Compiling Text.XML.HaXml.Combinators ( src/Text/XML/HaXml/Combinators.hs, dist/build/Text/XML/HaXml/Combinators.o )
[12 of 42] Compiling Text.XML.HaXml.Parse ( src/Text/XML/HaXml/Parse.hs, dist/build/Text/XML/HaXml/Parse.o )
[13 of 42] Compiling Text.XML.HaXml.Pretty ( src/Text/XML/HaXml/Pretty.hs, dist/build/Text/XML/HaXml/Pretty.o )
[14 of 42] Compiling Text.XML.HaXml.Html.Generate ( src/Text/XML/HaXml/Html/Generate.hs, dist/build/Text/XML/HaXml/Html/Generate.o )
[15 of 42] Compiling Text.XML.HaXml.Html.Parse ( src/Text/XML/HaXml/Html/Parse.hs, dist/build/Text/XML/HaXml/Html/Parse.o )
[16 of 42] Compiling Text.XML.HaXml.Wrappers ( src/Text/XML/HaXml/Wrappers.hs, dist/build/Text/XML/HaXml/Wrappers.o )
src/Text/XML/HaXml/Wrappers.hs:34:36:
Couldn't match type `[Char]' with `b0 -> c0'
Expected type: b0 -> c0
Actual type: String
In the return type of a call of `show'
Probable cause: `show' is applied to too many arguments
In the first argument of `(.)', namely `show 1'
In the second argument of `(++)', namely `show 1 . 24'
src/Text/XML/HaXml/Wrappers.hs:34:36:
Couldn't match expected type `[Char]' with actual type `a0 -> c0'
In the second argument of `(++)', namely `show 1 . 24'
In the second argument of `($)', namely
`"part of HaXml-" ++ show 1 . 24'
In a stmt of a 'do' block:
putStrLn $ "part of HaXml-" ++ show 1 . 24
Failed to install HaXml-1.24
cabal: Error: some packages failed to install:
HaXml-1.24 failed during the building phase. The exception was:
ExitFailure 1
帮忙!