News for hackers. Stuff that matters.
Re:Typed, modular macros for OCaml by otini on Saturday November 26, 2016 @01:27PM (#13045131)
This sounds very handy and I definitely need to learn more about LMS and Compiler Plugins. I wonder then what are the limitations on the values you can pass automatically across phases, since there must be (you cannot transfer e.g. a file handle from compile-time to run-time).
Re:Typed, modular macros for OCaml by kagebe on Saturday November 26, 2016 @03:03PM (#13045572)
As far as I understand, for LMS: Those types T for which one has implemented needed operations for the Rep[T] type.

Shameless plug: For another comparison of MetaOCaml, LMS, Terra and AnyDSL (our approach) under the lens of staging/partial evaluation see our paper from GPCE'15: http://www.cdl.uni-saarland.de/papers/gpce15.pdf

Re:Typed, modular macros for OCaml by rubenfiszel on Saturday November 26, 2016 @06:56PM (#13046764)
Hello,

I work on lms and we are preparing a new version where Rep is implemented as a typeclass instead of a monad. It's much more pleasant because you manipulate IR.Int and scala.Int. So with the proper import you actually handle IR.Int so you're staged code is no different than a normal code.