-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetup.hs
More file actions
executable file
·42 lines (32 loc) · 1.05 KB
/
Setup.hs
File metadata and controls
executable file
·42 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env runhaskell
-- module Main where
-- import Distribution.Simple
-- main :: IO ()
-- main = defaultMain
import Distribution.Simple
import Distribution.Simple.PreProcess
import Distribution.PackageDescription
import Distribution.Simple.LocalBuildInfo
import System.Cmd(system)
import System.Exit
--main = defaultMainWithHooks simpleUserHooks
-- --defaultUserHooks
main :: IO ()
main = do putStrLn$ "Running Setup.hs ..."
defaultMainWithHooks
simpleUserHooks
-- (simpleUserHooks {
-- --, hookedPreProcessors= (mypp : hookedPreProcessors hooks)
-- })
-- mypp :: PPSuffixHandler
-- mypp = (".y.pp", \ _ _ -> ppTestHandler)
-- ppTestHandler :: PreProcessor
-- ppTestHandler =
-- PreProcessor {
-- platformIndependent = True,
-- runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity ->
-- do putStrLn$ (inFile++" has been preprocessed to "++outFile)
-- stuff <- readFile inFile
-- writeFile outFile ("-- preprocessed as a test\n\n" ++ stuff)
-- return ()
-- }