5 Jul 09:04
Cabal and c2hs
From: Dominic Steinitz <dominic.steinitz <at> blueyonder.co.uk>
Subject: Cabal and c2hs
Newsgroups: gmane.comp.lang.haskell.libraries
Date: 2008-07-05 07:06:35 GMT
Subject: Cabal and c2hs
Newsgroups: gmane.comp.lang.haskell.libraries
Date: 2008-07-05 07:06:35 GMT
Way back in 2005, I was able to build my haskell version of ping with
this Setup.hs
> import Distribution.Simple
> import Distribution.Simple.Utils(rawSystemPath)
>
> main =
> defaultMainWithHooks
> defaultUserHooks {
> hookedPreProcessors =
> [("chs", \_ _ -> myPpC2hs)]
> }
>
> myPpC2hs inFile outFile verbose
> = rawSystemPath verbose "c2hs" ["-o", outFile, inFile]
rawSystemPath no longer seems to exist (in Distribution.Simple.Utils at
any rate).
Looking at the latest haddock, there does seem to be
> runSimplePreProcessor :: PreProcessor -> FilePath -> FilePath -> Verbosity -> IO ()
> ppC2hs :: BuildInfo -> LocalBuildInfo -> PreProcessor
but I'm struggling to see what I put in BuildInfo and LocalBuildInfo.
I presume I put "." as the FilePath?
> main = runSimplePreProcessor (ppC2hs undefined undefined) "." "." deafening
(Continue reading)
RSS Feed