3 ms·
As a Lisper who moved to Haskell, you will find Haskell lacking without template-haskell. With TemplateHaskell turned on, you can do the equivalent of quasi-quo
by chrisdone 12y ago
As a Lisper who moved to Haskell, you will find Haskell lacking without template-haskell. With TemplateHaskell turned on, you can do the equivalent of quasi-quotes and reader macros:
http://chrisdone.com/posts/common-lisp-haskell http://chrisdone.com/posts/common-lisp-haskell
But regular, syntax-extending macros aren't possible. E.g. you can't write AIF, there is only quasiquotation. But if you're just worried about DSLs, then that is indeed possible. There's a culture of avoiding template-haskell in favour of using combinators, so you will sometimes have to stomach ugly DSLs with awful operators and silly names. On the other hand lazy functions are like compiler macros, so they compose better than Lisp macros, which generally compose horribly.