defer skolem issue from unsolved meta application

This commit is contained in:
2024-11-09 14:39:07 -08:00
parent e814ebfb02
commit 69693a4995
7 changed files with 95 additions and 30 deletions

View File

@@ -19,7 +19,9 @@ emptyFC = (0,0)
-- Error of a parse
public export
data Error = E FC String
data Error
= E FC String
| Postpone FC Nat String
%name Error err
public export
@@ -33,6 +35,15 @@ showError src (E (line, col) msg) = "ERROR at \{show (line,col)}: \{msg}\n" ++ g
" \{x}\n \{replicate (cast col) ' '}^\n"
else if line - 3 < l then " " ++ x ++ "\n" ++ go (l + 1) xs
else go (l + 1) xs
showError src (Postpone (line, col) ix msg) = "ERROR at \{show (line,col)}: Postpone \{show ix} \{msg}\n" ++ go 0 (lines src)
where
go : Int -> List String -> String
go l [] = ""
go l (x :: xs) =
if l == line then
" \{x}\n \{replicate (cast col) ' '}^\n"
else if line - 3 < l then " " ++ x ++ "\n" ++ go (l + 1) xs
else go (l + 1) xs
public export
data Fixity = InfixL | InfixR | Infix