3 ms·
You could get most of the value in Haskell using higher-order functions, but note that the macro-based code generates a complete function definition from (defta
by yorwba 9y ago
You could get most of the value in Haskell using higher-order functions, but note that the macro-based code generates a complete function definition from (deftag tagname). Since definitions aren't values in Haskell (code isn't data), you can't just write
deftag "html"
but instead would have to write something like
html = tag "html"
I'm not sure whether you could get around that limitation using Template Haskell (never tried it).