Re: Re[2]: [Haskell-cafe] EDSL for Makefile
> > 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
Re[2]: [Haskell-cafe] EDSL for Makefile
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: [Haskell-cafe] EDSL for Makefile
Thanks Neil, > main = do > want ["file1"] > "file1" *> \x -> do > need ["file2"] > putStrLn "Hello" > putStrLn "World" What if I want to mention "file1" only once? -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
> I checked out the video - nice - but I think, understandably, since > its not open source yet, not much of implementations details were > mentioned. Yes, it's unfortunate. > So, I have this "unanswered question" nagging in my head. In the > example below, how can I let the makefile writer refer to the target > name and dependencies. Likr Emil mentioned, I could use "target r1" > but I want to avoid having to mention r1. If it helps, written in Shake, this would be: main = do want ["file1"] "file1" *> \x -> do need ["file2"] putStrLn "Hello" putStrLn "World" Thanks, Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
> > Thanks Emil ... yeah, that works...I was wondering what I could do to > not have to mention "r1" explicitly. > I'll check out Neil's pdf and video now - perhaps I'll find answers there. > I checked out the video - nice - but I think, understandably, since its not open source yet, not much of implementations details were mentioned. So, I have this "unanswered question" nagging in my head. In the example below, how can I let the makefile writer refer to the target name and dependencies. Likr Emil mentioned, I could use "target r1" but I want to avoid having to mention r1. http://hpaste.org/40233/haskell_makefile_edsl -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
On Thu, Sep 30, 2010 at 5:35 PM, Emil Axelsson wrote: > How about: > > execute ("gcc -c " ++ dependencyList ++ " -o " ++ target r1) > > / Emil Thanks Emil ... yeah, that works...I was wondering what I could do to not have to mention "r1" explicitly. I'll check out Neil's pdf and video now - perhaps I'll find answers there. -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
Thanks Neil On Sat, Oct 2, 2010 at 10:07 AM, Don Stewart wrote: > Neil's > > * slides http://www.galois.com/~dons/talks/hiw-2010/ndm-shake.pdf > * video http://www.vimeo.com/15465133 > > ckkashyap: >> Hi Neil ... how did the talk go? >> >> On Thu, Sep 30, 2010 at 10:23 PM, Neil Mitchell wrote: >> >>> What great timing! I will be giving a talk at the Haskell Implementors >> >>> Workshop tomorrow about the Make system Shake. It will be video taped >> >>> and I can send you the slides after I've given the talk. So wait a >> >>> day, and I'll give you all the answers. >> >> >> >> Will you publish the tool too? ;-) >> > >> > No :-( [or at least not yet] >> > >> > Wait for the talk, and I'll explain more. >> > >> > Thanks, Neil >> > ___ >> > Haskell-Cafe mailing list >> > Haskell-Cafe@haskell.org >> > http://www.haskell.org/mailman/listinfo/haskell-cafe >> > >> >> >> >> -- >> Regards, >> Kashyap >> ___ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
Neil's * slides http://www.galois.com/~dons/talks/hiw-2010/ndm-shake.pdf * video http://www.vimeo.com/15465133 ckkashyap: > Hi Neil ... how did the talk go? > > On Thu, Sep 30, 2010 at 10:23 PM, Neil Mitchell wrote: > >>> What great timing! I will be giving a talk at the Haskell Implementors > >>> Workshop tomorrow about the Make system Shake. It will be video taped > >>> and I can send you the slides after I've given the talk. So wait a > >>> day, and I'll give you all the answers. > >> > >> Will you publish the tool too? ;-) > > > > No :-( [or at least not yet] > > > > Wait for the talk, and I'll explain more. > > > > Thanks, Neil > > ___ > > Haskell-Cafe mailing list > > Haskell-Cafe@haskell.org > > http://www.haskell.org/mailman/listinfo/haskell-cafe > > > > > > -- > Regards, > Kashyap > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
Hi Neil ... how did the talk go? On Thu, Sep 30, 2010 at 10:23 PM, Neil Mitchell wrote: >>> What great timing! I will be giving a talk at the Haskell Implementors >>> Workshop tomorrow about the Make system Shake. It will be video taped >>> and I can send you the slides after I've given the talk. So wait a >>> day, and I'll give you all the answers. >> >> Will you publish the tool too? ;-) > > No :-( [or at least not yet] > > Wait for the talk, and I'll explain more. > > Thanks, Neil > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
>> What great timing! I will be giving a talk at the Haskell Implementors >> Workshop tomorrow about the Make system Shake. It will be video taped >> and I can send you the slides after I've given the talk. So wait a >> day, and I'll give you all the answers. > > Will you publish the tool too? ;-) No :-( [or at least not yet] Wait for the talk, and I'll explain more. Thanks, Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
On Thu, Sep 30, 2010 at 13:05, Neil Mitchell wrote: > Hi, > > What great timing! I will be giving a talk at the Haskell Implementors > Workshop tomorrow about the Make system Shake. It will be video taped > and I can send you the slides after I've given the talk. So wait a > day, and I'll give you all the answers. Will you publish the tool too? ;-) /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
Hi, What great timing! I will be giving a talk at the Haskell Implementors Workshop tomorrow about the Make system Shake. It will be video taped and I can send you the slides after I've given the talk. So wait a day, and I'll give you all the answers. Thanks, Neil On Thu, Sep 30, 2010 at 6:02 AM, Neil Brown wrote: > On 30/09/10 09:41, C K Kashyap wrote: >> >> Hi All, >> I was thinking about doing an EDSL for Makefile (as an exercise) >> I put down my line of thought here - >> http://hpaste.org/40233/haskell_makefile_edsl >> >> I'd appreciate some feedback on the approach. Also, I wanted some idea >> on how(in the current approach) I could make the target name and the >> dependency available to the action writer - as shown below. >> >> r1 = Rule { >> target = "file1", >> dependsOn = ["file2"], >> action = do >> execute ("gcc -c " ++ dependencyList ++ " -o " ++ >> target) >> } >> >> > > Neil Mitchell gave a talk at AngloHaskell 2009 on doing a better make in > Haskell. I've found the abstract on the wiki: > http://www.haskell.org/haskellwiki/AngloHaskell/2009 but, alas, no slides to > be found. My memory was that he had implemented the system successfully for > internal use at a company and it had worked out quite well. Perhaps you can > contact him about the slides. > > Thanks, > > Neil. > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
How about: execute ("gcc -c " ++ dependencyList ++ " -o " ++ target r1) / Emil 2010-09-30 10:41, C K Kashyap skrev: Also, I wanted some idea on how(in the current approach) I could make the target name and the dependency available to the action writer - as shown below. r1 = Rule { target = "file1", dependsOn = ["file2"], action = do execute ("gcc -c " ++ dependencyList ++ " -o " ++ target) } ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
Hi Warren, > You might want to take a look at http://github.com/nfjinjing/nemesis > which is somewhat related. The above looks like a DSL approach and not an EDSL approach. -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
Thanks Neil and Warren. On Thu, Sep 30, 2010 at 3:32 PM, Neil Brown wrote: > On 30/09/10 09:41, C K Kashyap wrote: >> >> Hi All, >> I was thinking about doing an EDSL for Makefile (as an exercise) >> I put down my line of thought here - >> http://hpaste.org/40233/haskell_makefile_edsl >> >> I'd appreciate some feedback on the approach. Also, I wanted some idea >> on how(in the current approach) I could make the target name and the >> dependency available to the action writer - as shown below. >> >> r1 = Rule { >> target = "file1", >> dependsOn = ["file2"], >> action = do >> execute ("gcc -c " ++ dependencyList ++ " -o " ++ >> target) >> } >> >> > > Neil Mitchell gave a talk at AngloHaskell 2009 on doing a better make in > Haskell. I've found the abstract on the wiki: > http://www.haskell.org/haskellwiki/AngloHaskell/2009 but, alas, no slides to > be found. My memory was that he had implemented the system successfully for > internal use at a company and it had worked out quite well. Perhaps you can > contact him about the slides. > > Thanks, > > Neil. > -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
On 30/09/10 09:41, C K Kashyap wrote: Hi All, I was thinking about doing an EDSL for Makefile (as an exercise) I put down my line of thought here - http://hpaste.org/40233/haskell_makefile_edsl I'd appreciate some feedback on the approach. Also, I wanted some idea on how(in the current approach) I could make the target name and the dependency available to the action writer - as shown below. r1 = Rule { target = "file1", dependsOn = ["file2"], action = do execute ("gcc -c " ++ dependencyList ++ " -o " ++ target) } Neil Mitchell gave a talk at AngloHaskell 2009 on doing a better make in Haskell. I've found the abstract on the wiki: http://www.haskell.org/haskellwiki/AngloHaskell/2009 but, alas, no slides to be found. My memory was that he had implemented the system successfully for internal use at a company and it had worked out quite well. Perhaps you can contact him about the slides. Thanks, Neil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] EDSL for Makefile
Hi, You might want to take a look at http://github.com/nfjinjing/nemesis which is somewhat related. Warren On Thu, Sep 30, 2010 at 1:41 AM, C K Kashyap wrote: > Hi All, > I was thinking about doing an EDSL for Makefile (as an exercise) > I put down my line of thought here - > http://hpaste.org/40233/haskell_makefile_edsl > > I'd appreciate some feedback on the approach. Also, I wanted some idea > on how(in the current approach) I could make the target name and the > dependency available to the action writer - as shown below. > > r1 = Rule { > target = "file1", > dependsOn = ["file2"], > action = do > execute ("gcc -c " ++ dependencyList ++ " -o " ++ > target) > } > > > -- > Regards, > Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] EDSL for Makefile
Hi All, I was thinking about doing an EDSL for Makefile (as an exercise) I put down my line of thought here - http://hpaste.org/40233/haskell_makefile_edsl I'd appreciate some feedback on the approach. Also, I wanted some idea on how(in the current approach) I could make the target name and the dependency available to the action writer - as shown below. r1 = Rule { target = "file1", dependsOn = ["file2"], action = do execute ("gcc -c " ++ dependencyList ++ " -o " ++ target) } -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe