Commit 2cd71b0e authored by John van Groningen's avatar John van Groningen
Browse files

moved function checkLocalFunctions from checksupport to checkFunctionBodies

parent e3bf26e5
......@@ -2,6 +2,7 @@ implementation module checkFunctionBodies
import syntax, typesupport, parse, checksupport, utilities, checktypes, transform, predef //, RWSDebug
import explicitimports, comparedefimp, mergecases
from check import checkFunctions
cIsInExpressionList :== True
cIsNotInExpressionList :== False
......@@ -462,6 +463,11 @@ where
(let_expr, expr_heap) = buildLetExpression strict_binds lazy_binds let_expr let_expr_position expr_heap
= (if (isEmpty strict_binds && isEmpty lazy_binds) let_expr_position NoPos, let_expr, expr_heap)
checkLocalFunctions :: !Index !Level !LocalDefs !*{#FunDef} !*ExpressionInfo !*Heaps !*CheckState
-> (!.{#FunDef},!.ExpressionInfo,!.Heaps,!.CheckState);
checkLocalFunctions mod_index level (CollectedLocalDefs {loc_functions={ir_from,ir_to}}) fun_defs e_info heaps cs
= checkFunctions mod_index level ir_from ir_to fun_defs e_info heaps cs
checkExpression :: ![FreeVar] !ParsedExpr !ExpressionInput !*ExpressionState !*ExpressionInfo !*CheckState
-> *(!Expression, ![FreeVar], !*ExpressionState, !*ExpressionInfo, !*CheckState);
checkExpression free_vars (PE_List exprs) e_input e_state e_info cs
......
......@@ -148,9 +148,6 @@ instance <<< IdentPos, ExplImpInfo, DeclarationInfo
, ef_is_macro_fun :: !Bool
}
checkLocalFunctions :: !Index !Level !LocalDefs !*{#FunDef} !*ExpressionInfo !*Heaps !*CheckState
-> (!.{#FunDef},!.ExpressionInfo,!.Heaps,!.CheckState);
convertIndex :: !Index !Index !(Optional ConversionTable) -> !Index
retrieveGlobalDefinition :: !SymbolTableEntry !STE_Kind !Index -> (!Index, !Index)
......
......@@ -222,20 +222,12 @@ where
, ef_is_macro_fun :: !Bool
}
checkLocalFunctions :: !Index !Level !LocalDefs !*{#FunDef} !*ExpressionInfo !*Heaps !*CheckState
-> (!.{#FunDef},!.ExpressionInfo,!.Heaps,!.CheckState);
checkLocalFunctions mod_index level (CollectedLocalDefs {loc_functions={ir_from,ir_to}}) fun_defs e_info heaps cs
= checkFunctions mod_index level ir_from ir_to fun_defs e_info heaps cs
convertIndex :: !Index !Index !(Optional ConversionTable) -> !Index
convertIndex index table_index (Yes tables)
= tables.[table_index].[index]
convertIndex index table_index No
= index
retrieveGlobalDefinition :: !SymbolTableEntry !STE_Kind !Index -> (!Index, !Index)
retrieveGlobalDefinition {ste_kind = STE_Imported kind decl_index, ste_def_level, ste_index} requ_kind mod_index
| kind == requ_kind
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment