[Haskell-cafe] Is it possible to declare assignment operators in Haskell?
Alexander Alexeev
mail at eax.me
Wed Feb 5 12:37:18 UTC 2014
Hello!
I'm wondering, is there any way to declare assignment operators
in Haskell? For example, strict assignment operators:
x .= y -- equals: let x = y `deepseq` y
x := y -- equals: x <- y `deepseq` y
As far as I can tell, Template Haskell is not able to do anything like
this, because I can't event quote expressions like `let x = y` or `x <-
y`. Is there any other way (plugin for GHC, etc)? Or maybe I'm doing
something wrong and TH is quite able to handle this task?
I'm pretty sure that I could use a preprocessor, but I wonted to find
a better solution.
--
Best regards,
Alexander Alexeev
http://eax.me/
More information about the Haskell-Cafe
mailing list