#1521: Problems building the time library with Cabal / Setup.hs
--------------------------------+-------------------------------------------
  Reporter:  Olivier Boudry     |          Owner:         
      Type:  bug                |         Status:  new    
  Priority:  normal             |      Milestone:  Not GHC
 Component:  libraries (other)  |        Version:  6.6.1  
  Severity:  minor              |       Keywords:         
Difficulty:  Unknown            |             Os:  Windows
  Testcase:                     |   Architecture:  x86    
--------------------------------+-------------------------------------------
I get the following error when building the time library using ghc-6.6.1
 and Cabal-1.1.6.2.

 {{{
 C:\Temp\time>runhaskell Setup.hs configure

 Setup.hs:17:29:
     Couldn't match expected type `GHC.IOBase.ExitCode'
            against inferred type `()'
       Expected type: Args
                      -> Bool
                      -> PackageDescription
                      -> LocalBuildInfo
                      -> IO GHC.IOBase.ExitCode
       Inferred type: Args
                      -> Bool
                      -> PackageDescription
                      -> LocalBuildInfo
                      -> IO ()
     In the `runTests' field of a record
     In the expression:
         defaultUserHooks
             {confHook = add_Win32_dep $ (confHook defaultUserHooks),
              runTests = runTestScript}
 }}}

 I solved it by changing the type signature of runTestScript and removing
 the maybeExit function call from the body:
 {{{
 import GHC.IOBase
 ...
 runTestScript :: Args -> Bool -> PackageDescription -> LocalBuildInfo ->
 IO GHC.IOBase.ExitCode
 runTestScript _args _flag _pd _lbi
  = withCurrentDirectory "test" $ system "make"
 }}}

 Then, the Setup.hs script compiles but I get a dependency problem
 {{{
 C:\Temp\time>runhaskell Setup.hs configure
 Configuring time-1.1.1...
 configure: Dependency Win32-any: using Win32-2.1.1
 configure: Dependency base-any: using base-2.1.1
 Setup.hs: cannot satisfy dependency old-locale-any
 }}}

 I solved it with removing that dependency from the time.cabal file.

 Last issue: at installation HsTimeConfig.h is missing (copied it from
 ghc-6.6.1 source).

 I don't know to which extent those problems are related to my specific
 installation. Looks like the user hooks signature has changed in the
 latest versions of Cabal.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1521>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to