[ codegen ] PiType no longer hard-coded JS

This commit is contained in:
2025-07-26 07:23:16 -07:00
parent 43c06e7377
commit 1bdac27097
3 changed files with 4 additions and 4 deletions

View File

@@ -302,7 +302,7 @@ getNames : Tm -> List QName -> List QName
getNames (Ref x nm) acc = nm :: acc
getNames (Lam x str _ _ t) acc = getNames t acc
getNames (App x t u) acc = getNames u $ getNames t acc
getNames (Pi x str icit y t u) acc = getNames u $ getNames t acc
getNames (Pi x str icit y t u) acc = getNames u $ getNames t $ QN primNS "PiType" :: acc
getNames (Let x str t u) acc = getNames u $ getNames t acc
getNames (LetRec x str _ t u) acc = getNames u $ getNames t acc
getNames (Case x t alts) acc = foldl getAltNames acc alts

View File

@@ -143,7 +143,7 @@ compileTerm (UU _) = pure $ CRef (QN Nil "U")
compileTerm (Pi _ nm icit rig t u) = do
t' <- compileTerm t
u' <- compileTerm u
pure $ CAppRef (QN Nil "PiType") (t' :: CLam nm u' :: Nil) 0
pure $ CAppRef (QN primNS "PiType") (t' :: CLam nm u' :: Nil) 0
compileTerm (Case fc t alts) = do
t' <- compileTerm t
alts' <- for alts $ \case