Literate setup script, and use -fasm. it's faster

This commit is contained in:
dons
2005-12-02 04:58:04 +00:00
parent 4dfc49d672
commit c39ad8a207
3 changed files with 20 additions and 17 deletions

19
Setup.lhs Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env runhaskell
> module Main where
> import Distribution.Simple
> import Distribution.Setup ( ConfigFlags (..) )
> import System.Directory ( findExecutable )
>
> main :: IO ()
> main = defaultMainWithHooks (defaultUserHooks { postConf = defaultPostConf })
> where defaultPostConf args flags lbi {- xx -}
> = do args' <- fmap (args++) (configToArgs flags)
> (postConf defaultUserHooks) args' flags lbi {- xx -}
>
> configToArgs :: ConfigFlags -> IO [String]
> configToArgs (ConfigFlags { configHcPath = Just hcPath })
> = do exec <- findExecutable hcPath
> case exec of
> Just realPath -> return ["--with-ghc="++realPath]
> Nothing -> return ["--with-ghc="++hcPath]
> configToArgs _ = return []