tweaks to playground samples

This commit is contained in:
2024-11-26 17:04:00 -08:00
parent d4bcbc5949
commit e2db5a77df
4 changed files with 62 additions and 41 deletions

View File

@@ -308,7 +308,12 @@ process (done,docs) nm = do
export
compile : M (List Doc)
-- compile = do
-- top <- get
-- traverse entryToDoc top.defs
compile = reverse . snd <$> process ([],[]) "main"
compile = do
top <- get
case lookup "main" top of
Just _ => reverse . snd <$> process ([],[]) "main"
-- If there is no main, compile everything for the benefit of the playground
Nothing => do
top <- get
traverse entryToDoc top.defs