[Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml

2010-04-07 Thread Heinrich Apfelmus
Nicolas Pouillard wrote: > Heinrich Apfelmus wrote: >> I'm curious, can metaocaml create new data type definitions, value >> declarations or type class instances? > > No metaocaml cannot do this. It is restricted to the expression > level, and not the declaration level. Moreover you cannot pattern

Re: [Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml

2010-04-06 Thread Nicolas Pouillard
On Tue, 06 Apr 2010 09:37:59 -0400, Jacques Carette wrote: > One thing I should have mentionned - TH and camlp4 are really > equivalents. And camlp4 is as-typed-as TH (or not, depending on your > point of view). I am co-author of a camlp4 extension, and I must admit > that coding in camlp4 wa

Re: [Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml

2010-04-06 Thread Jacques Carette
One thing I should have mentionned - TH and camlp4 are really equivalents. And camlp4 is as-typed-as TH (or not, depending on your point of view). I am co-author of a camlp4 extension, and I must admit that coding in camlp4 was not enjoyable, while coding in metaocaml (eventually) is. [I se

Re: [Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml

2010-04-06 Thread Nicolas Pouillard
On Tue, 06 Apr 2010 15:08:45 +0200, Heinrich Apfelmus wrote: > Jacques Carette wrote: > > Jason Dagit wrote: > >> Are you implying that template haskell is not typed? > > > > Indeed. [...] > > > > Compare with metaocaml where if you can compile you meta-program (i.e. > > code generator), then you

[Haskell-cafe] Re: Metaprogramming in Haskell vs. Ocaml

2010-04-06 Thread Heinrich Apfelmus
Jacques Carette wrote: > Jason Dagit wrote: >> Are you implying that template haskell is not typed? > > Indeed. [...] > > Compare with metaocaml where if you can compile you meta-program (i.e. > code generator), then you are guaranteed that it can only ever produce > valid, well-typed code. Not so