[Haskell-cafe] EDSL for Makefile

C K Kashyap ckkashyap at gmail.com
Sun Oct 3 23:41:54 EDT 2010


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

Thanks Bulat ....
I guess even this should work -

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


-- 
Regards,
Kashyap


More information about the Haskell-Cafe mailing list