write output to file (if -o), cmd line parser, handle dup imports

This commit is contained in:
2024-09-29 11:06:48 -07:00
parent fa7d803ebb
commit 76e627825c
5 changed files with 55 additions and 32 deletions

View File

@@ -19,11 +19,11 @@ lookup nm top = go top.defs
export
covering
Show TopContext where
show (MkTop defs metas _ _) = "\nContext:\n [\{ joinBy "\n" $ map show defs}]"
show (MkTop defs metas _ _ _) = "\nContext:\n [\{ joinBy "\n" $ map show defs}]"
public export
empty : HasIO m => m TopContext
empty = pure $ MkTop [] !(newIORef (MC [] 0)) False !(newIORef [])
empty = pure $ MkTop [] !(newIORef (MC [] 0)) False !(newIORef []) []
||| set or replace def. probably need to check types and Axiom on replace
public export

View File

@@ -342,6 +342,8 @@ record TopContext where
metas : IORef MetaContext
verbose : Bool
errors : IORef (List Error)
||| loaded modules
loaded : List String
-- we'll use this for typechecking, but need to keep a TopContext around too.