Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-30 Thread Yitzchak Gale
Ben Millwood wrote: I once spent some time and energy making [foo| bar baz |\] quux |] do the right thing for a quasiquoter I implemented, only to discover that GHC already supports [foo| bar baz \|] quux |]. So yes, you can escape it. Wow, that actually works. That is very surprising,

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-29 Thread Yitzchak Gale
Steffen Schuldenzucker wrote: Btw., does TH parse this correctly? (If I was TH, I would not): myPHPCode = [s| ?php $description = Use the quasiquoter like this: [s|some text|]; print $description.\n; ? |] (the tricky part is |] occurring in the quoted text) Can we escape it? Yes, like

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-29 Thread Yitzchak Gale
Steffen Schuldenzucker wrote: * Embed Haskell into some other language is solved by Literate Haskell * Embed some other language into Haskell is solved by heredocs Dave Bayer wrote: Nice pairing. I wrote my own literate preprocessor, which GHC gracefully accepts, to accomplish both of these

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-29 Thread Ben Millwood
2011/6/28 Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de: Btw., does TH parse this correctly? (If I was TH, I would not): myPHPCode = [s| ?php $description = Use the quasiquoter like this: [s|some text|]; print $description.\n; ? |] (the tricky part is |] occurring in the quoted

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-29 Thread Manfred Lotz
On Tue, 28 Jun 2011 07:13:19 -0700 Dave Bayer ba...@cpw.math.columbia.edu wrote: Part of the dominance of scripting languages is clean support for heredocs. So much of every arena of life comes down to getting It's not about me! I love Haskell but it doesn't get this. Imagine a document

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-28 Thread Jean-Marie Gaillourdet
Hi Audrey, are you aware that Haskell already supports multi-line strings? foo = This is a\ \multi-line\ \string! See Section 2.6 of http://haskell.org/onlinereport/lexemes.html Regards, Jean On 25.06.11 22:55, 唐鳳 wrote: Hi all, I've just released string-qq 0.0.2 to

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-28 Thread Ivan Lazar Miljenovic
2011/6/28 Jean-Marie Gaillourdet j...@gaillourdet.net: Hi Audrey, are you aware that Haskell already supports multi-line strings? foo = This is a\       \multi-line\       \string! See Section 2.6 of http://haskell.org/onlinereport/lexemes.html I've used this approach for multi-line

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-28 Thread 唐鳳
Jean-Marie Gaillourdet 於 2011/6/28 下午4:57 寫道: Hi Audrey, are you aware that Haskell already supports multi-line strings? foo = This is a\ \multi-line\ \string! Hi Jean-Marie, Yeah, I am aware of that, I wrote a 381-lines multi-lines strings once… :-)

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-28 Thread Dave Bayer
Part of the dominance of scripting languages is clean support for heredocs. So much of every arena of life comes down to getting It's not about me! I love Haskell but it doesn't get this. Imagine a document that's nominally Haskell, but about 80% some other language such as TeX (e.g. code for a

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-28 Thread Krzysztof Skrzętnicki
What about Literate Haskell then? People write a lot of LH blog posts, so it would seem to be quite flexible. Best regards, Krzysztof Skrzętnicki On Tue, Jun 28, 2011 at 16:13, Dave Bayer ba...@cpw.math.columbia.eduwrote: Part of the dominance of scripting languages is clean support for

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-28 Thread Steffen Schuldenzucker
On 06/28/2011 08:25 PM, Krzysztof Skrzętnicki wrote: What about Literate Haskell then? People write a lot of LH blog posts, so it would seem to be quite flexible. IMHO, these are different tasks. * Embed Haskell into some other language is solved by Literate Haskell * Embed some other

Re: [Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-28 Thread Dave Bayer
On Jun 28, 2011, at 2:34 PM, Steffen Schuldenzucker wrote: On 06/28/2011 08:25 PM, Krzysztof Skrzętnicki wrote: What about Literate Haskell then? People write a lot of LH blog posts, so it would seem to be quite flexible. IMHO, these are different tasks. * Embed Haskell into some other

[Haskell] ANNOUNCE: string-qq-0.0.2

2011-06-25 Thread 唐鳳
Hi all, I've just released string-qq 0.0.2 to Hackage: http://hackage.haskell.org/package/string-qq The main interface is the s quasi-quoter: foo :: IsString a = a foo = [s| This is a multi-line string! |] It allows simple multi-line strings of any IsString type (Text, String,