如何安装通用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     
已邀请:
我设法从源头上自己安装了通用haskell,对此我进行了管理,并且能够描述如何对其进行修复。我的安装平台是Haskell平台2011.2.0.1-x86_64,但是以下说明有些通用。 我遇到了三个问题,包括您描述的第一个问题(下面的第3个问题)。对于其他用户,我还描述了前两个,您也可能已经解决了。 1)其他用户首先要根据已更改的
Data.Map.lookup
类型来修复错误,因为
containers
> = 0.2.0.0:它曾经返回
Monad m => m b
(在
containers-1.0.0.0
中),现在仅返回
Maybe b
。 我在
Data.Maybe.maybeToList
中添加了呼叫,以修复一些需要使用列表类型的呼叫站点。我敢打赌,您以某种方式解决了相同的错误。您可以在以下位置找到此修复程序: http://hpaste.org/47624。 2)我在使用GHC 7时遇到的另一个错误是配置脚本没有意识到它比GHC 6.8更新,因此它还需要依赖于容器。配置输出包括以下行:   检查基本软件包是否已拆分(GHC 6.8或更高版本)...否 要解决此问题,您需要更换
if test $ghc_ma -ge 6 -a $ghc_mi -ge 8; then
if test $ghc_ma -eq 6 -a $ghc_mi -ge 8 -o $ghc_ma -ge 7; then
3)要解决您的问题,您需要编辑ѭ10(假设您没有使用make in-place进行就地安装)。您需要添加一个id:行并修复depends行,以使用系统上存在的软件包的软件包ID代替软件包名称。您可以使用以下命令找出ID(包括我系统上的输出):
$ ghc-pkg field base id
id: base-4.3.1.0-f5c465200a37a65ca26c5c6c600f6c76
$ ghc-pkg field haskell98 id
id: haskell98-1.1.0.1-150131ea75216886448a7146c9e0526b
$ ghc-pkg field containers id
id: containers-0.4.0.0-b4885363abca642443ccd842502a3b7e
更改为“ 10”将是:
-depends:        base-4.3.1.0
-                haskell98-1.1.0.1
-                containers-0.4.0.0
+depends:        base-4.3.1.0-f5c465200a37a65ca26c5c6c600f6c76
+                haskell98-1.1.0.1-150131ea75216886448a7146c9e0526b
+                containers-0.4.0.0-b4885363abca642443ccd842502a3b7e
此外,您需要在同一文件中添加一条ID行-只要重新安装该库时更改了ID,任何ID都可以。我在这里使用:
id:             generic-haskell-1.80-lib-md5sum-2a7ae9d60440627618ad0b0139ef090b
我还将所有字段都用空格对齐,就像在现有文件中一样。可以在以下位置找到此文件的语法参考: http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/packages.html#installed-pkg-info     
显然,ѭ15软件包取决于
base
的旧版本。 Haskell平台指定base-4.3.1.0,而通用haskell需要较旧的版本。请联系维护者,或者可能安装较旧版本的GHC。     

要回复问题请先登录注册