Closed yusungsim closed 21 hours ago
Ah yes. Expansion is a bit naive, it assumes all following elements of the same sequence are arguments, and the expansion is just not using them. Fixing that will require adding a notion of hint arity somehow, so that only a suitable prefix is used. I will give that a try.
In the mean time, there are two possible workarounds:
hint(show () %%)
.`()
(note the leading backtick for escaping, which turns the parens into atoms).The former is a bit of a hack. The latter may be even closer to what you really want.
Btw, show hints use expressions, not strings. If you put quotes around, they'll just get type-set as a text literal.
Okay, for now I implemented a hack that should fix this.
Hi, I came across an issue while rendering an inference rule to a LaTeX code.
Below is a minified DSL code of interest.
The value
VUnit
has a display hintshow "()"
, and the value is used in the inference ruleinterp
.When this code is compiled and a LaTeX code is generated, the LaTeX code incorrectly renders the inference rule. Specifically, the rendered rule misses the symbol
s'
at the rightmost part of the rule, right after the`()'
. Below is the result LaTeX code of rendering the above DSL code. (i.e.$ ./watsup min_state/a.watsup --latex
)As you see in the 14th line (
s \rightarrow \mbox{\texttt{`()'}}
), the rendered rule misses the last symbols'
.I experimented with variants of the code to narrow down the cause of this issue, and I expect that the display hint has something to do with this issue. If the display hint of value
VUnit
is removed as the below code, SpecTec correctly renders the rule with the symbols'
.(Parts of the modified DSL code and its resulting LaTeX code)
I also checked the IL compiled from the DSL code (i.e.
$ ./watsup min_state/a.watsup --print-il
), but it seems SpecTec correctly produces IL with the symbols'
. So I think that this issue is related with the LaTeX backend.