Open xsebek opened 11 months ago
Making Document
a bifunctor does not really make sense to me. It seems like instead we should just use something like Document (Either Syntax Type)
, or better yet make a new type data Parsed = ParsedSyntax Syntax | ParsedType Type | ParsedEntity Entity | ...
or something like that, and then use Document Parsed
.
(I don't think I actually like the name Parsed
, I just had to put something.)
@byorgey thanks, that sounds like a better approach 👍
IIRC letting lens create a prism for it should allow me to s ^. sTerm . plate . _PSyntax . getConst
in pedagogy. 🤔
In #1106, parsing types was left out, as they are not used that often. (Type ascription is just an expression.)
Parse and validate raw code snippets marked as types:
and include them in the markdown AST. Optionally make the
Document
a bifunctor/... on type type.