Re: [Haskell-cafe] putting the result of a function in `infix` declaration

2013-06-23 Thread Karl Voelker
On Sun, Jun 23, 2013 at 6:36 AM, TP paratribulati...@free.fr wrote:

 In a more general way, let us suppose I have a Haskell library able to
 perform some calculations: how to use it in a pre-processing step, before
 compilation of the executable?


You are looking for Template Haskell.

http://www.haskell.org/haskellwiki/Template_Haskell

I'm not sure how up-to-date the wiki is, but it should give you the general
idea.

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


Re: [Haskell-cafe] putting the result of a function in `infix` declaration

2013-06-23 Thread Roel van Dijk
Related to Karl's Template Haskell suggestion you could also have a look at
quasiquotation:

http://www.haskell.org/haskellwiki/Quasiquotation

The GHC documentation has an example of a expression quoter:

http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.html#th-quasiquotation


On 23 June 2013 22:22, Karl Voelker ktvoel...@gmail.com wrote:

 On Sun, Jun 23, 2013 at 6:36 AM, TP paratribulati...@free.fr wrote:

 In a more general way, let us suppose I have a Haskell library able to
 perform some calculations: how to use it in a pre-processing step, before
 compilation of the executable?


 You are looking for Template Haskell.

 http://www.haskell.org/haskellwiki/Template_Haskell

 I'm not sure how up-to-date the wiki is, but it should give you the
 general idea.

 -Karl V.

 ___
 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