[Haskell-cafe] EDSL for Makefile

Bulat Ziganshin bulat.ziganshin at gmail.com
Sun Oct 3 11:23:13 EDT 2010


Hello C,

Sunday, October 3, 2010, 6:59:25 PM, you wrote:

> Thanks Neil,

>> main = do
>>  want ["file1"]
>>  "file1" *> \x -> do
>>    need ["file2"]
>>    putStrLn "Hello"
>>    putStrLn "World"

> What if I want to mention "file1" only once?

mention_only_once file action = do
  want [file]
  file *> action

main = mention_only_once "file1" $ \x -> do need ["file2"]
                                            putStrLn "Hello"
                                            putStrLn "World"




-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list