From 03038c013b07c5a9520df18d702f724d04ef0d03 Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Fri, 19 Jul 2024 12:20:35 +0300 Subject: [PATCH] wip --- hbs2-cli/app/Main.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hbs2-cli/app/Main.hs b/hbs2-cli/app/Main.hs index a0a55c52..fcb03978 100644 --- a/hbs2-cli/app/Main.hs +++ b/hbs2-cli/app/Main.hs @@ -404,7 +404,6 @@ main = do es -> do pure $ mkForm "dict" es - tell $ bindMatch "map" $ \syn -> do case syn of [ListVal (SymbolVal "lambda" : SymbolVal fn : _), ListVal rs] -> do @@ -438,6 +437,14 @@ main = do [ sy ] -> display sy ss -> display (mkList ss) + tell $ bindMatch "newline" $ nil_ $ \case + [] -> liftIO (putStrLn "") + _ -> throwIO (BadFormException @C nil) + + tell $ bindMatch "print" $ nil_ $ \case + [ sy ] -> display sy >> liftIO (putStrLn "") + ss -> mapM_ display ss >> liftIO (putStrLn "") + tell $ bindMatch "debug:show-cli" $ nil_ \case _ -> display cli