3 ms·
I'd say the whole game of eDSL creation is an act of metaprogramming. There are examples littered everywhere in the Haskell world—though rarely do syntax abstra
by tel 12y ago
I'd say the whole game of eDSL creation is an act of metaprogramming. There are examples littered everywhere in the Haskell world—though rarely do syntax abstractions like macros get used. This is because it's relatively easy to embed a natural style program in a monad or applicative functor, access the syntax, and compile it.
A smattering:
http://hackage.haskell.org/package/accelerate http://hackage.haskell.org/package/accelerate
https://github.com/mainland/nikola https://github.com/mainland/nikola
http://hackage.haskell.org/package/esqueleto http://hackage.haskell.org/package/esqueleto
http://hackage.haskell.org/package/api-tools http://hackage.haskell.org/package/api-tools
http://hackage.haskell.org/package/atom http://hackage.haskell.org/package/atom
http://hackage.haskell.org/package/diagrams http://hackage.haskell.org/package/diagrams
http://hackage.haskell.org/package/c-dsl http://hackage.haskell.org/package/c-dsl
https://hackage.haskell.org/package/js-good-parts https://hackage.haskell.org/package/js-good-parts
http://hackage.haskell.org/package/Bang http://hackage.haskell.org/package/Bang
http://hackage.haskell.org/package/orc http://hackage.haskell.org/package/orc
And if you buy that definition, then there is some ungodly metaprogramming available in dependently typed languages.
https://github.com/pigworker/MetaprogAgda/blob/master/notes.pdf?raw=true https://github.com/pigworker/MetaprogAgda/blob/master/notes....
Though, to be clear, there are few who can follows those notes today.