Commit ba9b33ea authored by Martin Wierich's avatar Martin Wierich
Browse files

enabled higher order function elimination also for functions (producers)

that are imported
parent a50e8172
......@@ -11,7 +11,7 @@ class (=<) infix 4 a :: !a !a -> CompareValue
instance =< Int, Expression, {# Char}, Ident, [a] | =< a, BasicType //, (Global a) | =< a
instance =< Type
instance =< Type, SymbIdent
instance == BasicType, TypeVar, TypeSymbIdent, DefinedSymbol, TypeContext , BasicValue,
FunKind, (Global a) | == a, Priority, Assoc
......
......@@ -422,8 +422,8 @@ cIsALocalVar :== False
:: ConsClasses =
{ cc_size ::!Int
, cc_args ::![ConsClass] // the lists have the
, cc_linear_bits ::![Bool] // same length
, cc_args ::![ConsClass]
, cc_linear_bits ::![Bool]
}
:: ConsClass :== Int
......@@ -548,10 +548,11 @@ cNonRecursiveAppl :== False
:: FunctionInfo = FI_Empty | FI_Function !GeneratedFunction
:: Producer = PR_Empty
| PR_Function !SymbIdent !Index !Int // Int: number of actual arguments in application
| PR_Function !SymbIdent !Index
| PR_Class !App ![BoundVar] !Type
// | PR_Constructor !SymbIdent ![Expression]
| PR_GeneratedFunction !SymbIdent !Index !Int // Int: number of actual arguments in application
| PR_GeneratedFunction !SymbIdent !Index
| PR_Curried !SymbIdent
:: InstanceInfo = II_Empty | II_Node !{! Producer} !FunctionInfoPtr !InstanceInfo !InstanceInfo
......
......@@ -516,10 +516,11 @@ cNotVarNumber :== -1
:: FunctionInfo = FI_Empty | FI_Function !GeneratedFunction
:: Producer = PR_Empty
| PR_Function !SymbIdent !Index !Int // Int: number of actual arguments in application (XXX possibly superfluous (already contained in SymbIdent))
| PR_Function !SymbIdent !Index
| PR_Class !App ![BoundVar] !Type
// | PR_Constructor !SymbIdent ![Expression]
| PR_GeneratedFunction !SymbIdent !Index !Int // Int: number of actual arguments in application (XXX possibly superfluous (already contained in SymbIdent))
| PR_GeneratedFunction !SymbIdent !Index
| PR_Curried !SymbIdent
:: InstanceInfo = II_Empty | II_Node !{! Producer} !FunctionInfoPtr !InstanceInfo !InstanceInfo
......@@ -1276,7 +1277,7 @@ where
instance <<< BoundVar
where
(<<<) file {var_name,var_info_ptr,var_expr_ptr}
= file <<< var_name <<< '<' <<< ptrToInt var_info_ptr <<< ',' <<< ptrToInt var_expr_ptr <<< '>'
= file <<< var_name <<< '<' <<< ptrToInt var_info_ptr <<< '>'
instance <<< (Bind a b) | <<< a & <<< b
where
......
This diff is collapsed.
Supports Markdown
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