-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing highlighting when interleaved mutual is used #6273
Comments
I noticed that the constructor The LaTeX backend also produces incorrect output (if the code above is placed in a \>[2]\AgdaKeyword{data}\ D\ \AgdaKeyword{where}
\ \ \ \ c\ \AgdaSymbol{:}\ D\<% However, with \>[2]\AgdaKeyword{data}\AgdaSpace{}%
\AgdaDatatype{D}\AgdaSpace{}%
\AgdaKeyword{where}\<%
\\
\>[2][@{}l@{\AgdaIndent{0}}]%
\>[4]\AgdaInductiveConstructor{c}\AgdaSpace{}%
\AgdaSymbol{:}\AgdaSpace{}%
\AgdaDatatype{D}\<% The reason for this discrepancy is presumably that when agda/src/full/Agda/Interaction/Imports.hs Lines 1008 to 1009 in fc4e2fa
So, why is the code not highlighted in the final round? Consider the following code: agda/src/full/Agda/TypeChecking/Rules/Decl.hs Lines 387 to 409 in fc4e2fa
If agda/src/full/Agda/TypeChecking/Rules/Decl.hs Line 155 in fc4e2fa
Apparently some declarations can escape the generation of highlighting information. The abstract syntax corresponding to the code in the OP has the following structure: Section [ScopedDecl [Mutual [ScopedDecl [DataSig],ScopedDecl [DataDef]]]] Syntax highlighting information is generated for the following parts:
If that line is removed, then proper highlighting is generated for the code in the OP (but not for the code from issue #6276). It seems as if some code constructs a agda/src/full/Agda/Syntax/Concrete/Definitions/Types.hs Lines 176 to 179 in fc4e2fa
I tried to preserve the ranges here, and that seems to fix the problem. |
The last two occurrences of
D
are not highlighted properly:If non-interactive highlighting is used, then you get proper highlighting the first time the module is loaded, but not when it is reloaded. If interactive highlighting is used, then you do not get proper highlighting the first or the second time.
The text was updated successfully, but these errors were encountered: