derive Show and Eq, improvements to LSP

This commit is contained in:
2026-02-24 20:01:58 -08:00
parent a789cffcce
commit 983dde4de2
21 changed files with 281 additions and 39 deletions

View File

@@ -7,18 +7,18 @@ import Lib.Common
-- and a pretty printer in the monad
data Error
= E FC String
| ENotFound FC String
| ENotInScope FC String
| Postpone FC QName String
instance HasFC Error where
getFC (E x str) = x
getFC (ENotFound x _) = x
getFC (ENotInScope x _) = x
getFC (Postpone x k str) = x
errorMsg : Error -> String
errorMsg (E x str) = str
errorMsg (ENotFound x nm) = "\{nm} not in scope"
errorMsg (ENotInScope x nm) = "\{nm} not in scope"
errorMsg (Postpone x k str) = str
showError : (src : String) -> Error -> String