
5 Feb
2014
5 Feb
'14
7:37 a.m.
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/