Re: [Haskell-cafe] Template Haskell vs Rewrite Rules?

2012-04-19 Thread Michael Sloan
You're in luck! This is something I've wanted to implement before in the past, and your email reminded me. While pretty awful, it could be used for doing some interesting value-interception instrumentation in Haskell. Recently I've been messing with TH a lot, so this initial implementation was

Re: [Haskell-cafe] Template Haskell vs Rewrite Rules?

2012-04-19 Thread Ismael Figueroa Palet
Hi Michael! Thanks (again) for your answer. I'm not quite confident using TH yet, but it seems in your code you must define an 'app' function, and then use [overloadedApp|... |] as a quasiquoteator to inject the overloaded app, right? Thanks for the zeroth reference too, one question remains for

Re: [Haskell-cafe] Template Haskell vs Rewrite Rules?

2012-04-19 Thread Jake McArthur
I once experimented with something similar. This is a preprocessor. This was a long time ago, and I don't use it. https://patch-tag.com/r/jmcarthur/overloaded-whitespace/snapshot/current/content/pretty/Main.hs On Thu, Apr 19, 2012 at 8:40 AM, Ismael Figueroa Palet ifiguer...@gmail.com wrote: Hi

[Haskell-cafe] Template Haskell vs Rewrite Rules?

2012-04-18 Thread Ismael Figueroa Palet
I'm working on getting annotated versions of all instances of a function of a typeclass, and was wondering what are the relation/differences between Template Haskell and the Rewrite Rules section. Of course this is specific to GHC. Another question, in Racket, primitive function application is