Re[2]: [Haskell-cafe] EDSL for Makefile

2010-10-03 Thread Bulat Ziganshin
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,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[2]: [Haskell-cafe] EDSL for Makefile

2010-10-03 Thread C K Kashyap

 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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe