Closed N-J-Martin closed 10 months ago
Should we specify that all markdown file names start with L_?
(also, I noticed the clean commit history, yay!)
Should we specify that all markdown file names start with L_?
I don't think it's that simple. We need to understand what conjure-vs-code is doing when looking up the documentation first.
In fact it's coming from the LSP support inside Conjure. Somewhere around here https://github.com/conjure-cp/conjure/blob/038b65effda3beb6d0763462fd0c8670630298b2/src/Conjure/LSP/Documentation.hs#L55
OK, this isn't that simple as I suspected.
All calls to putDocs
in the new lsp-doc-fetching branch I just created are potential keywords we need to cover.
See #631 for this branch.
This is less tied to lexemes/tokens as I thought it was. It should still be the lexeme name for symbolic operators (things like +-/*).
Currently I have the following places where putDocs
is called.
$ grep putDocs -rn src
[ ... removed function definition ... ]
src/Conjure/Language/Validator.hs:516: putDocs KeywordD "such_that" (makeTree l1 `mappend` makeTree l2)
src/Conjure/Language/Validator.hs:526: putDocs KeywordD "branching_on" (makeTree l1 `mappend` makeTree l2)
src/Conjure/Language/Validator.hs:541: FindStatement l1 fs -> l1 `isA` TtKeyword >> putDocs KeywordD "find" l1 >> validateStatementSeq SFind validateFind fs
src/Conjure/Language/Validator.hs:542: GivenStatement l1 gs -> l1 `isA` TtKeyword >> putDocs KeywordD "given" l1 >> validateStatementSeq SGiven validateGiven gs
src/Conjure/Language/Validator.hs:543: LettingStatement l1 ls -> l1 `isA` TtKeyword >> putDocs KeywordD "letting" l1 >> validateStatementSeq SLetting validateLetting ls
src/Conjure/Language/Validator.hs:565: putDocs KeywordD "new_type_enum" [l1, l2, l3]
src/Conjure/Language/Validator.hs:599: putDocs KeywordD "letting_domain" [lt]
src/Conjure/Language/Validator.hs:608: putDocs KeywordD "new_type_enum" [l1, l2, l3]
src/Conjure/Language/Validator.hs:633: putDocs KeywordD "letting_unnamed" [l1, l2, l3, l4]
src/Conjure/Language/Validator.hs:693: putDocs TypeD "tuple" l1
src/Conjure/Language/Validator.hs:697: putDocs TypeD "record" l1
src/Conjure/Language/Validator.hs:701: putDocs TypeD "variant" l1
src/Conjure/Language/Validator.hs:705: putDocs TypeD "matrix" l1
src/Conjure/Language/Validator.hs:711: putDocs TypeD "set" l1
src/Conjure/Language/Validator.hs:716: putDocs TypeD "mset" l1
src/Conjure/Language/Validator.hs:721: putDocs TypeD "function" l1
src/Conjure/Language/Validator.hs:726: putDocs TypeD "sequence" l1
src/Conjure/Language/Validator.hs:731: putDocs TypeD "relation" l1
src/Conjure/Language/Validator.hs:736: putDocs TypeD "partition" l1
src/Conjure/Language/Validator.hs:995: putDocs AttributeD (T.pack $ show name) t
src/Conjure/Language/Validator.hs:1005: putDocs AttributeD (T.pack $ show name) t
src/Conjure/Language/Validator.hs:1176: putDocs KeywordD (T.pack $ show name') name
src/Conjure/Language/Validator.hs:1189: putDocs KeywordD "powerset_projection" lt
src/Conjure/Language/Validator.hs:1233: putDocs FunctionD (lexemeText name') name
src/Conjure/Language/Validator.hs:1256: putDocs OperatorD (T.pack $ "pre_" ++ show op) lt
src/Conjure/Language/Validator.hs:1285: putDocs OperatorD "post_factorial" lt
src/Conjure/Language/Validator.hs:1600: putDocs KeywordD "expr_in_domain_projection" l1
src/Conjure/Language/Validator.hs:1609: putDocs KeywordD "expr_projection" lt
OK, this isn't that simple as I suspected.
All calls to
putDocs
in the new lsp-doc-fetching branch I just created are potential keywords we need to cover.See #631 for this branch.
This is less tied to lexemes/tokens as I thought it was. It should still be the lexeme name for symbolic operators (things like +-/*).
Currently I have the following places where
putDocs
is called.$ grep putDocs -rn src [ ... removed function definition ... ] src/Conjure/Language/Validator.hs:516: putDocs KeywordD "such_that" (makeTree l1 `mappend` makeTree l2) src/Conjure/Language/Validator.hs:526: putDocs KeywordD "branching_on" (makeTree l1 `mappend` makeTree l2) src/Conjure/Language/Validator.hs:541: FindStatement l1 fs -> l1 `isA` TtKeyword >> putDocs KeywordD "find" l1 >> validateStatementSeq SFind validateFind fs src/Conjure/Language/Validator.hs:542: GivenStatement l1 gs -> l1 `isA` TtKeyword >> putDocs KeywordD "given" l1 >> validateStatementSeq SGiven validateGiven gs src/Conjure/Language/Validator.hs:543: LettingStatement l1 ls -> l1 `isA` TtKeyword >> putDocs KeywordD "letting" l1 >> validateStatementSeq SLetting validateLetting ls src/Conjure/Language/Validator.hs:565: putDocs KeywordD "new_type_enum" [l1, l2, l3] src/Conjure/Language/Validator.hs:599: putDocs KeywordD "letting_domain" [lt] src/Conjure/Language/Validator.hs:608: putDocs KeywordD "new_type_enum" [l1, l2, l3] src/Conjure/Language/Validator.hs:633: putDocs KeywordD "letting_unnamed" [l1, l2, l3, l4] src/Conjure/Language/Validator.hs:693: putDocs TypeD "tuple" l1 src/Conjure/Language/Validator.hs:697: putDocs TypeD "record" l1 src/Conjure/Language/Validator.hs:701: putDocs TypeD "variant" l1 src/Conjure/Language/Validator.hs:705: putDocs TypeD "matrix" l1 src/Conjure/Language/Validator.hs:711: putDocs TypeD "set" l1 src/Conjure/Language/Validator.hs:716: putDocs TypeD "mset" l1 src/Conjure/Language/Validator.hs:721: putDocs TypeD "function" l1 src/Conjure/Language/Validator.hs:726: putDocs TypeD "sequence" l1 src/Conjure/Language/Validator.hs:731: putDocs TypeD "relation" l1 src/Conjure/Language/Validator.hs:736: putDocs TypeD "partition" l1 src/Conjure/Language/Validator.hs:995: putDocs AttributeD (T.pack $ show name) t src/Conjure/Language/Validator.hs:1005: putDocs AttributeD (T.pack $ show name) t src/Conjure/Language/Validator.hs:1176: putDocs KeywordD (T.pack $ show name') name src/Conjure/Language/Validator.hs:1189: putDocs KeywordD "powerset_projection" lt src/Conjure/Language/Validator.hs:1233: putDocs FunctionD (lexemeText name') name src/Conjure/Language/Validator.hs:1256: putDocs OperatorD (T.pack $ "pre_" ++ show op) lt src/Conjure/Language/Validator.hs:1285: putDocs OperatorD "post_factorial" lt src/Conjure/Language/Validator.hs:1600: putDocs KeywordD "expr_in_domain_projection" l1 src/Conjure/Language/Validator.hs:1609: putDocs KeywordD "expr_projection" lt
This does seem like a problem that needs solving, but I think to dedicate the proper time to it, we need to wait until next semester.
This does seem like a problem that needs solving, but I think to dedicate the proper time to it, we need to wait until next semester.
Agreed!
Can you make an issue for this so we don't forget please? This PR will be merged soon...
last one for now @hz66-404 !