Template Haskell: simple way to "declare" type and instance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
PY
Reply | Threaded
Open this post in threaded view
|

Template Haskell: simple way to "declare" type and instance

PY
Hello, All!

Is any way similar to templates (like in Crystal language, Rust, etc)
to create `data X = ...`, `instance Show ...`, etc in TH? I found this
tutorial https://wiki.haskell.org/A_practical_Template_Haskell_Tutorial
but all looks complicated. Or something like Lisp macros, may be some
modern library? Like quasy-quotations but for `data` and `instance`
declarations (I don't know is it possible even) ?

===
Best regards, Paul
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners