primitive string and int, primitive functions, codegen fixes

This commit is contained in:
2024-08-22 19:41:24 -07:00
parent dfa6b835b0
commit 9db5649446
14 changed files with 142 additions and 29 deletions

View File

@@ -30,6 +30,16 @@ processDecl (TypeSig fc nm tm) = do
putStrLn "got \{pprint [] ty'}"
modify $ setDef nm ty' Axiom
processDecl (PType fc nm) = do
ctx <- get
modify $ setDef nm (U fc) PrimTCon
processDecl (PFunc fc nm ty src) = do
top <- get
ty <- check (mkCtx top.metas) ty (VU fc)
ty' <- nf [] ty
putStrLn "pfunc \{nm} : \{pprint [] ty'} := \{show src}"
modify $ setDef nm ty' (PrimFn src)
processDecl (Def fc nm raw) = do
putStrLn "-----"
putStrLn "def \{show nm}"