From cdf88f13008cd3f6511d466c1078ae7b2f983faf Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Fri, 9 Sep 2022 12:41:03 +0100 Subject: Refactored the compiler result to plug in the code generator Also some tweaks in error reporting. --- test/Language.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/Language.hs') diff --git a/test/Language.hs b/test/Language.hs index 6680178..9f47008 100644 --- a/test/Language.hs +++ b/test/Language.hs @@ -25,7 +25,7 @@ expectError input etyp = do Left e -> assertFailure $ show e Right ast -> do res <- return $ evalState (compileAll ast) startState - case res of + case crExit res of Left e -> case (find (\(E.Error t _ _) -> t == etyp) e) of Just _ -> return () Nothing -> assertFailure $ "expected " ++ show etyp ++ " didn't happen, got instead:\n" ++ unlines (map (\(E.Error t _ _) -> show t) e) -- cgit v1.2.3