如何安装通用haskell
|
安装完拥抱后,再安装ghc6,然后再安装generic-haskell,将显示以下消息,该怎么办?
# make package
Creating generic-haskell package ...
ghc-pkg: cannot find package generic-haskell
Reading package info from \"generic-haskell.cabal.pkg\" ... done.
generic-haskell-1.80: missing id field
generic-haskell-1.80: dependency \"base-4.2.0.0\" doesn\'t exist (use --force to override)
generic-haskell-1.80: dependency \"haskell98-1.0.1.1\" doesn\'t exist (use --force to override)
generic-haskell-1.80: dependency \"containers-0.3.0.0\" doesn\'t exist (use --force to override)
make: *** [package] Error 1
在Ubuntu中,我编译ghc-6.2.2有以下错误
/usr/bin/ghc -M -optdep-f -optdep.depend -osuf o -H16m -O HaskTags.hs
on the commandline:
Warning: -optdep-f is deprecated: Use -dep-makefile instead
------------------------------------------------------------------------
==fptools== make boot - --no-print-directory -r;
in /home/martin/ghc-6.2.2/ghc/utils/ghc-pkg
------------------------------------------------------------------------
/usr/bin/ghc -M -optdep-f -optdep.depend -osuf o -H16m -O -cpp -DPKG_TOOL -DWANT_PRETTY Main.hs Package.hs ParsePkgConfLite.hs Version.hs
on the commandline:
Warning: -optdep-f is deprecated: Use -dep-makefile instead
make all
/usr/bin/ghc -H16m -O -cpp -DPKG_TOOL -DWANT_PRETTY -c Main.hs -o Main.o -ohi Main.hi
Main.hs:496:11:
Ambiguous type variable `e\' in the constraint:
`Exception.Exception e\'
arising from a use of `Exception.throw\' at Main.hs:496:11-25
Possible cause: the monomorphism restriction applied to the following:
my_catch :: forall a. IO a -> (e -> IO a) -> IO a
(bound at Main.hs:499:0)
my_throw :: forall a. e -> a (bound at Main.hs:496:0)
Probable fix: give these definition(s) an explicit type signature
or use -XNoMonomorphismRestriction
Main.hs:498:13:
Ambiguous type variable `e1\' in the constraint:
`Exception.Exception e1\'
arising from a use of `Exception.catch\' at Main.hs:498:13-27
Possible cause: the monomorphism restriction applied to the following:
eval_catch :: forall a. a -> (e1 -> IO a) -> IO a
(bound at Main.hs:498:0)
Probable fix: give these definition(s) an explicit type signature
or use -XNoMonomorphismRestriction
make[4]: *** [Main.o] Error 1
make[3]: *** [boot] Error 2
make[2]: *** [boot] Error 1
make[1]: *** [boot] Error 1
有人在ubuntu 10中安装了旧版本的GHC和通用haskell吗?
版本有很多对,我尝试过ghc-6.2.2遇到上述错误,我是否需要卸载ubuntu 10才能安装旧版本的ubuntu才能正常工作?哪个版本的ubuntu适用于哪个ghc版本?
http://www.cs.uu.nl/research/projects/generic-haskell/compiler.html
没有找到相关结果
已邀请:
2 个回复
厦惫
类型来修复错误,因为
> = 0.2.0.0:它曾经返回
(在
中),现在仅返回
。 我在
中添加了呼叫,以修复一些需要使用列表类型的呼叫站点。我敢打赌,您以某种方式解决了相同的错误。您可以在以下位置找到此修复程序: http://hpaste.org/47624。 2)我在使用GHC 7时遇到的另一个错误是配置脚本没有意识到它比GHC 6.8更新,因此它还需要依赖于容器。配置输出包括以下行: 检查基本软件包是否已拆分(GHC 6.8或更高版本)...否 要解决此问题,您需要更换
与
3)要解决您的问题,您需要编辑ѭ10(假设您没有使用make in-place进行就地安装)。您需要添加一个id:行并修复depends行,以使用系统上存在的软件包的软件包ID代替软件包名称。您可以使用以下命令找出ID(包括我系统上的输出):
更改为“ 10”将是:
此外,您需要在同一文件中添加一条ID行-只要重新安装该库时更改了ID,任何ID都可以。我在这里使用:
我还将所有字段都用空格对齐,就像在现有文件中一样。可以在以下位置找到此文件的语法参考: http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/packages.html#installed-pkg-info
蔬谢窗港
的旧版本。 Haskell平台指定base-4.3.1.0,而通用haskell需要较旧的版本。请联系维护者,或者可能安装较旧版本的GHC。