3 ms·
There is one huge barrier -- the total inability to do runtime type-checks makes many types of macros impossible to do in the Lisp style (type-erasure means you
by blasdel 17y ago
There is one huge barrier -- the total inability to do runtime type-checks makes many types of macros impossible to do in the Lisp style (type-erasure means you can't even cheat).
PolyP lead to GenericHaskell which lead to Template Haskell, which is now included with GHC. They let you write generic functions that are passed the types of their arguments as a value alongside them, and then at compile-compile-time they are templated out into vanilla Haskell functions specialized on each argument type.