Open etorreborre opened 2 months ago
So, what’s happening here is that the Doc2
parser is grabbing '{{
as a single token, so then the first }}
is parsed as the end of the Doc2
, with '. }}
being parsed as Unison code, which it’s not happy about. I’m not sure how the previous parser wasn’t globbing those bits, but apparently it wasn’t.
A quick workaround is adding a space between '
and {{
, so they parse separately.
I’m fixing this by changing the word
parser to not blindly consume to the next space, because we shouldn’t force docs to have whitespace surrounding every delimiter.
My current workaround is to define a q: Doc -> Doc
function that just surrounds a Doc
term with '
:
q : Doc -> Doc
q d = Doc.Join [Word "'", d, Word "'"]
Describe and demonstrate the bug The following
Doc
fails to typecheck withucm
0.5.26
:The error is:
The same code typechecks ok with
0.5.25
.