- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在系统上安装 HaXml 时遇到问题。
我已经安装了 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
最佳答案
我知道问题是什么,但不知道一个很好的解决方案。
问题出在 src/Text/XML/HaXml/Wrappers.hs 文件中。 (仅供引用,您始终可以通过键入“cabal unpack”,然后 cd 进入新创建的目录来轻松查看 cabal 中的源代码)。如果您查看该文件,它会使用 ghc 语言扩展在实际编译之前将 c 样式预处理添加到构建中。在这种情况下,它被用于将构建的版本号插入到源代码中......这是行:
putStrLn $ "part of HaXml-"++show MAJOR.MINOR
> grep -r MAJOR *
HaXmL.cabal: cpp-options: -DMAJOR=1 -DMINOR=24
putStrLn $ "part of HaXml-"++show 1.24
putStrLn $ "part of HaXml-"++show 1 . 24
> cabal unpack HaXmL
> cd HaXmL-1.24
> cabal configure
> cabal build
> cabal install
关于macos - OS X 10.9 (Mavericks) 上的 HaXml 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20497348/
我想访问像这样的 XML 文件的数据 我想要例如读出每个 Foo 及其参数,我怎么能用 Haskell 做到这一点? (我想使用 Ha
我在系统上安装 HaXml 时遇到问题。 我已经安装了 Haskell 平台并使用了以下链接中提供的 clang-wrapper 补丁:http://www.haskell.org/platform/
我正在寻找一种在 Haskell 和 Java/Scala/C# 代码之间交换数据的解决方案。目前,我正在考虑使用 XML。理想情况下,我希望从我的 Haskell 数据类型生成 XML 模式。我的第
我是一名优秀的程序员,十分优秀!