Aoc passes, and it successfully compiles itself.
This commit is contained in:
@@ -138,7 +138,7 @@ compileTerm (UU _) = pure $ CRef "U"
|
||||
compileTerm (Pi _ nm icit rig t u) = do
|
||||
t' <- compileTerm t
|
||||
u' <- compileTerm u
|
||||
pure $ CApp (CRef "PiType") (t' :: u' :: Nil) 0
|
||||
pure $ CApp (CRef "PiType") (t' :: CLam nm u' :: Nil) 0
|
||||
compileTerm (Case _ t alts) = do
|
||||
t' <- compileTerm t
|
||||
alts' <- for alts $ \case
|
||||
|
||||
@@ -257,7 +257,7 @@ solveAutos mstart = do
|
||||
top <- get
|
||||
mc <- readIORef top.metaCtx
|
||||
let mlen = length' mc.metas - mstart
|
||||
res <- run $ filter isAuto (take (cast mlen) mc.metas)
|
||||
res <- run $ filter isAuto (ite (mstart == 0) mc.metas $ take (cast mlen) mc.metas)
|
||||
if res then solveAutos mstart else pure MkUnit
|
||||
where
|
||||
isAuto : MetaEntry -> Bool
|
||||
|
||||
@@ -80,7 +80,7 @@ class Pretty a where
|
||||
|
||||
|
||||
render : Int -> Doc -> String
|
||||
render w x = layout (best w 0 x) Lin
|
||||
render w x = layout (best w 0 (noAlt x)) Lin
|
||||
|
||||
|
||||
instance Semigroup Doc where x <+> y = Seq x (Seq (Text " ") y)
|
||||
|
||||
Reference in New Issue
Block a user