I use lhs2TeX for all my papers. It's wonderful.
But it can't parse ' in Proxy :: Proxy 'True! My solution has been to have %format ! = "\mathop{}\tick" but then I need to remember to use ! instead of ' in my code. And I have to define the action on ! separately for any operators, such as !:. The input ![] (correctly) does not parse as an operator, so I need %format nil = "\tick" [] and then remember to use nil. Then, I want to be able to compile my papers, so I need translations when style == newcode, as well. But the output cannot have ' in it, because that confuses lhs2TeX. So instead I have the output contain TICK and then use a perl script to replace TICK with '. (Yes, I know sed or awk or some such tool is more well-suited than perl here. But perl has the distinct advantage in that I already know how to use it.)
These workarounds do work, even at scale. But it would be great not to have to work around.
Thanks!
I use lhs2TeX for all my papers. It's wonderful.
But it can't parse
'inProxy :: Proxy 'True! My solution has been to have%format ! = "\mathop{}\tick"but then I need to remember to use!instead of'in my code. And I have to define the action on!separately for any operators, such as!:. The input does not parse as an operator, so I need%format nil = "\tick" []and then remember to usenil. Then, I want to be able to compile my papers, so I need translations whenstyle == newcode, as well. But the output cannot have'in it, because that confuses lhs2TeX. So instead I have the output containTICKand then use a perl script to replaceTICKwith'. (Yes, I knowsedorawkor some such tool is more well-suited than perl here. But perl has the distinct advantage in that I already know how to use it.)These workarounds do work, even at scale. But it would be great not to have to work around.
Thanks!