Open zenzike opened 1 month ago
Yes, I typically define
%if style == newcode
%format (TYAPP x) = "@" x
%else
%format (TYAPP x) = "\keyw{@}" x
%endif
Thanks, I also used
%if style == newcode
%format (TLIST(x)) = "'[" x "]"
%else
%format (TLIST(x)) = " ^\prime\![" x "]"
%endif
to deal with type lists, which also caused problems.
Type applications such as
f @Int
for some functionf
are a bit of a nuisance to work with; there's the obvious problem that@
needs to be escaped, but I am wondering if it would make sense for lhs2tex to work well with these automatically.Unless I'm missing something, the current workaround is to make appropriate
%format
directives that elaborate to@
in Haskell, and print@
properly in tex.