Hatena::Grouphaskell

HowManyFilesの日記

2010-02-09こんにちは haskell

結果

20:17

こんな感じに。

Setup.hs:18:19:
    Couldn't match expected type `GenericPackageDescription'
           against inferred type `Either
                                    GenericPackageDescription PackageDescription'
      Expected type: (GenericPackageDescription, HookedBuildInfo)
      Inferred type: (Either
                        GenericPackageDescription PackageDescription,
                      HookedBuildInfo)
    In the `confHook' field of a record
    In the second argument of `($)', namely
        `defaultUserHooks
           {confHook = customConfig, buildHook = customBuild}'

Setup.hs:88:21:
    Couldn't match expected type `GenericPackageDescription'
           against inferred type `Either
                                    GenericPackageDescription PackageDescription'
      Expected type: (GenericPackageDescription, HookedBuildInfo)
      Inferred type: (Either
                        GenericPackageDescription PackageDescription,
                      HookedBuildInfo)
    In the first argument of `configure', namely `pdbi'
    In a stmt of a 'do' expression: lbi <- configure pdbi cf

Setup.hs の88行目をやっつけで以下のように書き換えて、再挑戦。

どうも、『GenericPackageDescription が欲しいのに、GenericPackageDescription か HookedBuildInfo のどっちがもらえるか分からない状態だよ』とかそんな意味らしいので、無理やり GenericPackageDescription を渡すようにしてみる感じですね。

customConfig :: (GenericPackageDescription, HookedBuildInfo) -> ConfigFlags -> IO LocalBuildInfo

当然ダメ。以下のようなエラーが出る

Setup.hs:1:0:
    Warning: In the use of `defaultUserHooks'
             (imported from Distribution.Simple):
             Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2
             compatibility in which case you must stick with defaultUserHooks"
Compiling HOC_cbits...
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:28,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:218,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:17,
                 from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:81,
                 from HOC_cbits/ObjectMap.m:1:
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:51: error: expected specifier-qualifier-list before ‘StgPtr’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bdescr’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:163: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:174: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:187: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:198: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:219: error: expected ‘)’ before ‘n’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:223: error: expected ‘)’ before ‘n’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:235: error: expected declaration specifiers or ‘...’ before ‘nat’
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./include/Block.h:241: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘StgWord’
Setup.hs: Failed in C compilation.

仕切り直し

ぐちゃぐちゃやりすぎたので、一旦 Haskell の環境を全部消して入れ直すことに。

そうすると、cabal configure までは行けるようになった。build で同じようにこける点は変わらず。