drop HOAS, add Monad stack.

HOAS was dropped while fixing unrelated bug, but I think I'll keep it
out.
This commit is contained in:
2024-04-11 19:57:02 -07:00
parent 6a59aa97f8
commit a9c72d5a6d
6 changed files with 58 additions and 37 deletions

View File

@@ -31,7 +31,7 @@ showError src (E (line, col) msg) = "Err at \{show (line,col)} \{msg}\n" ++ go 0
if l == line then
"\{x}\n\{replicate (cast col) ' '}^\n"
else if line - 3 < l then x ++ "\n" ++ go (l + 1) xs
else ""
else go (l + 1) xs
-- Result of a parse
public export
@@ -68,7 +68,7 @@ parse : Parser a -> TokenList -> Either Error a
parse pa toks = case runP pa toks False emptyPos of
Fail fatal err toks com => Left err
OK a [] _ => Right a
OK a ts _ => Left (error toks "Extra toks")
OK a ts _ => Left (error ts "Extra toks")
-- I think I want to drop the typeclasses for v1