[ codegen ] PiType no longer hard-coded JS
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user