From 1a1f0b8129d6804b50d9fa971656c249f1fd087a Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Wed, 31 Aug 2022 07:43:21 +0100 Subject: Technically is the function type itself what is testing --- src/Compiler.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Compiler.hs b/src/Compiler.hs index 785efab..a8cca5d 100644 --- a/src/Compiler.hs +++ b/src/Compiler.hs @@ -86,8 +86,8 @@ definedType (A.Type t) = t `elem` types definedType (A.FuncType ts r) = all definedType ts && fromMaybe False (fmap definedType r) -verifyFuncTypes :: String -> [A.FuncParam] -> Maybe A.Type -> SourcePos -> [Error] -verifyFuncTypes ident params ret pos = do +verifyFuncType :: String -> [A.FuncParam] -> Maybe A.Type -> SourcePos -> [Error] +verifyFuncType ident params ret pos = do ( catMaybes $ map ( \(id, t, pos) -> @@ -115,7 +115,7 @@ compile x = do -- current env (ev, errs) <- get -- check for undefined types - (ev, errs) <- return $ (ev, (verifyFuncTypes ident params ret pos) ++ errs) + (ev, errs) <- return $ (ev, (verifyFuncType ident params ret pos) ++ errs) -- updated with the function (ev, errs) <- return $ case addSymUniq ev (ident, ftype, pos) of -- cgit v1.2.3