diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-08-31 07:43:21 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-08-31 07:43:21 +0100 |
commit | 1a1f0b8129d6804b50d9fa971656c249f1fd087a (patch) | |
tree | 41b5f55f969d85fd5ef2d25275e01b73fd7cd3ea /src | |
parent | 90a8f16e5f1d852f21fbbaf2b0631d348973152a (diff) | |
download | micro-lang-hs-1a1f0b8129d6804b50d9fa971656c249f1fd087a.tar.gz micro-lang-hs-1a1f0b8129d6804b50d9fa971656c249f1fd087a.zip |
Technically is the function type itself what is testing
Diffstat (limited to 'src')
-rw-r--r-- | src/Compiler.hs | 6 |
1 files 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 |