Re: [Haskell-cafe] reasons why Template Haskell does not propose something similar to Python exec() or eval()

2013-08-25 Thread Dag Odenhall
There's a proposalfor adding a proper Haskell QuasiQuoter as part of template-haskell. Until then, as others have noted your best option is the haskell-src-meta package, but be aware that this uses a separate

Re: [Haskell-cafe] reasons why Template Haskell does not propose something similar to Python exec() or eval()

2013-08-25 Thread TP
Tobias Dammers wrote: > IIRC you can use haskell-src-exts to parse a string into TH AST > structures. There might even be a quasi-quoter for that; I don't have a > real computer at hand right more, so you'll need to do some research of > your own. Thanks Tobias, it led me to the right path. There

Re: [Haskell-cafe] reasons why Template Haskell does not propose something similar to Python exec() or eval()

2013-08-24 Thread Marc Weber
Excerpts from TP's message of Sat Aug 24 11:36:04 +0200 2013: > Haskell does not propose something similar to Python (or bash) exec() or > eval(), i.e. does not offer the possibility to take a (quoted) string in You actually have eval/exec like features. You can run "ghc" modules in a haskell ap

Re: [Haskell-cafe] reasons why Template Haskell does not propose something similar to Python exec() or eval()

2013-08-24 Thread Tobias Dammers
IIRC you can use haskell-src-exts to parse a string into TH AST structures. There might even be a quasi-quoter for that; I don't have a real computer at hand right more, so you'll need to do some research of your own. On Aug 24, 2013 11:37 AM, "TP" wrote: > Hi everybody, > > I continue to learn a

Re: [Haskell-cafe] reasons why Template Haskell does not propose something similar to Python exec() or eval()

2013-08-24 Thread jean-christophe mincke
Hello, Maybe you could have a look at Quasi Quotation . Regards J-C On Sat, Aug 24, 2013 at 11:36 AM, TP wrote: > Hi everybody, > > I continue to learn and test Template Haskell (one more time thanks to John > Lato for his post at: > > http:

[Haskell-cafe] reasons why Template Haskell does not propose something similar to Python exec() or eval()

2013-08-24 Thread TP
Hi everybody, I continue to learn and test Template Haskell (one more time thanks to John Lato for his post at: http://www.mail-archive.com/haskell-cafe@haskell.org/msg106696.html that made me understand a lot of things). I have a question about the way Template Haskell is working. Why Templat