From d4c554f62b007df2763c73ba7fd2b13814c186bc Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 21 Nov 2019 12:56:09 +0100 Subject: Diagnose (do) as error at compile time --- Compiler.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'Compiler.hs') diff --git a/Compiler.hs b/Compiler.hs index 3a85ae0..347eb4a 100644 --- a/Compiler.hs +++ b/Compiler.hs @@ -184,6 +184,7 @@ compileProgram (Program values) = runCM $ do genTValue :: TaggedValue -> Int -> CM Ref genTValue (TVList []) _ = throwError "Empty call" +genTValue (TVList [TVName "do" _]) _ = throwError "Empty 'do'" genTValue (TVList (TVName "do" _ : stmts)) nextnext = do forM_ (init stmts) $ \stmt -> do b <- newBlock -- cgit v1.2.3-54-g00ecf