Commit 8bd791fb authored by John van Groningen's avatar John van Groningen
Browse files

remove tuple symbol from UniqueSelector (! selector) and MatchExpr

parent c7018944
...@@ -1865,14 +1865,8 @@ where ...@@ -1865,14 +1865,8 @@ where
= [] = []
convertExpr (TupleSelect {ds_arity} n expr) convertExpr (TupleSelect {ds_arity} n expr)
= beTupleSelectNode ds_arity n (convertExpr expr) = beTupleSelectNode ds_arity n (convertExpr expr)
convertExpr (MatchExpr optionalTuple {glob_module, glob_object={ds_index}} expr) convertExpr (MatchExpr {glob_module, glob_object={ds_index,ds_arity}} expr)
= beMatchNode (arity optionalTuple) (beConstructorSymbol glob_module ds_index) (convertExpr expr) = beMatchNode ds_arity (beConstructorSymbol glob_module ds_index) (convertExpr expr)
where
arity :: (Optional (Global DefinedSymbol)) -> Int
arity No
= 1
arity (Yes {glob_object={ds_arity}})
= ds_arity
convertExpr (Conditional {if_cond=cond, if_then, if_else=Yes else}) convertExpr (Conditional {if_cond=cond, if_then, if_else=Yes else})
= beIfNode (convertExpr cond) (convertExpr if_then) (convertExpr else) = beIfNode (convertExpr cond) (convertExpr if_then) (convertExpr else)
......
...@@ -2959,7 +2959,9 @@ where ...@@ -2959,7 +2959,9 @@ where
| pre_mod.pds_def == mod_index | pre_mod.pds_def == mod_index
= (class_members, class_instances, fun_types, { cs & cs_predef_symbols = cs_predef_symbols} = (class_members, class_instances, fun_types, { cs & cs_predef_symbols = cs_predef_symbols}
<=< adjustPredefSymbolAndCheckIndex PD_StringType mod_index PD_StringTypeIndex STE_Type <=< adjustPredefSymbolAndCheckIndex PD_StringType mod_index PD_StringTypeIndex STE_Type
<=< adjust_predef_symbols PD_ListType PD_UnboxedArrayType mod_index STE_Type <=< adjust_predef_symbols PD_ListType PD_OverloadedListType mod_index STE_Type
<=< adjust_predef_symbols_and_check_indices PD_Arity2TupleType PD_Arity32TupleType PD_Arity2TupleTypeIndex mod_index STE_Type
<=< adjust_predef_symbols PD_LazyArrayType PD_UnboxedArrayType mod_index STE_Type
<=< adjust_predef_symbols PD_ConsSymbol PD_Arity32TupleSymbol mod_index STE_Constructor <=< adjust_predef_symbols PD_ConsSymbol PD_Arity32TupleSymbol mod_index STE_Constructor
<=< adjustPredefSymbol PD_TypeCodeClass mod_index STE_Class <=< adjustPredefSymbol PD_TypeCodeClass mod_index STE_Class
<=< adjustPredefSymbol PD_TypeCodeMember mod_index STE_Member <=< adjustPredefSymbol PD_TypeCodeMember mod_index STE_Member
...@@ -2989,7 +2991,6 @@ where ...@@ -2989,7 +2991,6 @@ where
<=< adjustPredefSymbol PD_DynamicValue mod_index (STE_Field unused) <=< adjustPredefSymbol PD_DynamicValue mod_index (STE_Field unused)
<=< adjustPredefSymbol PD_TypeID mod_index STE_Type <=< adjustPredefSymbol PD_TypeID mod_index STE_Type
<=< adjustPredefSymbol PD_ModuleID mod_index STE_Constructor) <=< adjustPredefSymbol PD_ModuleID mod_index STE_Constructor)
// AA..
# (pre_mod, cs_predef_symbols) = cs_predef_symbols![PD_StdGeneric] # (pre_mod, cs_predef_symbols) = cs_predef_symbols![PD_StdGeneric]
# type_iso_ident = predefined_idents.[PD_TypeISO] # type_iso_ident = predefined_idents.[PD_TypeISO]
| pre_mod.pds_def == mod_index | pre_mod.pds_def == mod_index
...@@ -3037,6 +3038,13 @@ where ...@@ -3037,6 +3038,13 @@ where
<=< adjustPredefSymbol next_symb mod_index symb_kind <=< adjustPredefSymbol next_symb mod_index symb_kind
<=< adjust_predef_symbols (inc next_symb) last_symb mod_index symb_kind <=< adjust_predef_symbols (inc next_symb) last_symb mod_index symb_kind
adjust_predef_symbols_and_check_indices next_symb last_symb type_index mod_index symb_kind cs
| next_symb > last_symb
= cs
= cs
<=< adjustPredefSymbolAndCheckIndex next_symb mod_index type_index symb_kind
<=< adjust_predef_symbols_and_check_indices (inc next_symb) last_symb (inc type_index) mod_index symb_kind
count_members :: !Index !{# ClassInstance} !{# ClassDef} !{# DclModule} -> Int count_members :: !Index !{# ClassInstance} !{# ClassDef} !{# DclModule} -> Int
count_members mod_index com_instance_defs com_class_defs modules count_members mod_index com_instance_defs com_class_defs modules
# (sum, _, _) # (sum, _, _)
......
...@@ -1027,8 +1027,7 @@ checkExpression free_vars (PE_Selection selector_kind expr selectors) e_input e_ ...@@ -1027,8 +1027,7 @@ checkExpression free_vars (PE_Selection selector_kind expr selectors) e_input e_
ParsedNormalSelector ParsedNormalSelector
-> (Selection NormalSelector expr selectors, free_vars, e_state, e_info, cs) -> (Selection NormalSelector expr selectors, free_vars, e_state, e_info, cs)
ParsedUniqueSelector unique_element ParsedUniqueSelector unique_element
# (tuple_type, cs) = getPredefinedGlobalSymbol (GetTupleTypeIndex 2) PD_PredefinedModule STE_Type 2 cs -> (Selection UniqueSelector expr selectors, free_vars, e_state, e_info, cs)
-> (Selection (UniqueSelector tuple_type) expr selectors, free_vars, e_state, e_info, cs)
checkExpression free_vars (PE_Update expr1 selectors expr2) e_input e_state e_info cs checkExpression free_vars (PE_Update expr1 selectors expr2) e_input e_state e_info cs
# (expr1, free_vars, e_state, e_info, cs) = checkExpression free_vars expr1 e_input e_state e_info cs # (expr1, free_vars, e_state, e_info, cs) = checkExpression free_vars expr1 e_input e_state e_info cs
(selectors, free_vars, e_state, e_info, cs) = checkSelectors cEndWithUpdate free_vars selectors e_input e_state e_info cs (selectors, free_vars, e_state, e_info, cs) = checkSelectors cEndWithUpdate free_vars selectors e_input e_state e_info cs
...@@ -1805,13 +1804,12 @@ transfromPatternIntoBind mod_index def_level (AP_Algebraic cons_symbol=:{glob_mo ...@@ -1805,13 +1804,12 @@ transfromPatternIntoBind mod_index def_level (AP_Algebraic cons_symbol=:{glob_mo
_ _
| ds_arity == 1 | ds_arity == 1
# (binds, var_store, expr_heap, e_info, cs) # (binds, var_store, expr_heap, e_info, cs)
= transfromPatternIntoBind mod_index def_level (hd args) (MatchExpr No cons_symbol src_expr) = transfromPatternIntoBind mod_index def_level (hd args) (MatchExpr cons_symbol src_expr)
position var_store expr_heap e_info cs position var_store expr_heap e_info cs
-> (opt_var_bind ++ binds, var_store, expr_heap, e_info, cs) -> (opt_var_bind ++ binds, var_store, expr_heap, e_info, cs)
# (tuple_type, cs) = getPredefinedGlobalSymbol (GetTupleTypeIndex ds_arity) PD_PredefinedModule STE_Type ds_arity cs # (tuple_cons, cs) = getPredefinedGlobalSymbol (GetTupleConsIndex ds_arity) PD_PredefinedModule STE_Constructor ds_arity cs
(tuple_cons, cs) = getPredefinedGlobalSymbol (GetTupleConsIndex ds_arity) PD_PredefinedModule STE_Constructor ds_arity cs
(match_var, match_bind, var_store, expr_heap) (match_var, match_bind, var_store, expr_heap)
= bind_match_expr (MatchExpr (Yes tuple_type) cons_symbol src_expr) opt_var_bind position var_store expr_heap = bind_match_expr (MatchExpr cons_symbol src_expr) opt_var_bind position var_store expr_heap
-> transform_sub_patterns mod_index def_level args tuple_cons.glob_object 0 match_var match_bind -> transform_sub_patterns mod_index def_level args tuple_cons.glob_object 0 match_var match_bind
position var_store expr_heap e_info cs position var_store expr_heap e_info cs
where where
...@@ -2195,8 +2193,7 @@ buildSelections e_input {ap_opt_var, ap_array_var, ap_selections} ...@@ -2195,8 +2193,7 @@ buildSelections e_input {ap_opt_var, ap_array_var, ap_selections}
1 # (unq_select_symb, cs) = getPredefinedGlobalSymbol PD_UnqArraySelectFun PD_StdArray STE_Member 2 cs 1 # (unq_select_symb, cs) = getPredefinedGlobalSymbol PD_UnqArraySelectFun PD_StdArray STE_Member 2 cs
-> (unq_select_symb, NormalSelector, cs) -> (unq_select_symb, NormalSelector, cs)
_ # (select_symb, cs) = getPredefinedGlobalSymbol PD_ArraySelectFun PD_StdArray STE_Member 2 cs _ # (select_symb, cs) = getPredefinedGlobalSymbol PD_ArraySelectFun PD_StdArray STE_Member 2 cs
(tuple_type, cs) = getPredefinedGlobalSymbol (GetTupleTypeIndex 2) PD_PredefinedModule STE_Type 2 cs -> (select_symb, UniqueSelector, cs)
-> (select_symb, UniqueSelector tuple_type, cs)
e_state e_state
= { e_state & es_var_heap = es_var_heap, es_expr_heap = es_expr_heap } = { e_state & es_var_heap = es_var_heap, es_expr_heap = es_expr_heap }
(index_exprs, (free_vars, e_state, e_info, cs)) (index_exprs, (free_vars, e_state, e_info, cs))
......
...@@ -946,10 +946,9 @@ instance e_corresponds Expression where ...@@ -946,10 +946,9 @@ instance e_corresponds Expression where
e_corresponds (ABCCodeExpr dcl_lines dcl_do_inline) (ABCCodeExpr icl_lines icl_do_inline) e_corresponds (ABCCodeExpr dcl_lines dcl_do_inline) (ABCCodeExpr icl_lines icl_do_inline)
= equal2 dcl_lines icl_lines = equal2 dcl_lines icl_lines
o` equal2 dcl_do_inline icl_do_inline o` equal2 dcl_do_inline icl_do_inline
e_corresponds (MatchExpr dcl_opt_tuple_type dcl_cons_symbol dcl_src_expr) e_corresponds (MatchExpr dcl_cons_symbol dcl_src_expr)
(MatchExpr icl_opt_tuple_type icl_cons_symbol icl_src_expr) (MatchExpr icl_cons_symbol icl_src_expr)
= e_corresponds dcl_opt_tuple_type icl_opt_tuple_type = e_corresponds dcl_cons_symbol icl_cons_symbol
o` e_corresponds dcl_cons_symbol icl_cons_symbol
o` e_corresponds dcl_src_expr icl_src_expr o` e_corresponds dcl_src_expr icl_src_expr
e_corresponds (FreeVar dcl) (FreeVar icl) e_corresponds (FreeVar dcl) (FreeVar icl)
= e_corresponds dcl icl = e_corresponds dcl icl
......
...@@ -412,9 +412,9 @@ where ...@@ -412,9 +412,9 @@ where
= (AnyCodeExpr codeBinding1 codeBinding2 strings, ci) = (AnyCodeExpr codeBinding1 codeBinding2 strings, ci)
convertDynamics _ _ _ (ABCCodeExpr strings bool) ci convertDynamics _ _ _ (ABCCodeExpr strings bool) ci
= (ABCCodeExpr strings bool, ci) = (ABCCodeExpr strings bool, ci)
convertDynamics cinp bound_vars default_expr (MatchExpr opt_symb symb expression) ci convertDynamics cinp bound_vars default_expr (MatchExpr symb expression) ci
# (expression,ci) = convertDynamics cinp bound_vars default_expr expression ci # (expression,ci) = convertDynamics cinp bound_vars default_expr expression ci
= (MatchExpr opt_symb symb expression, ci) = (MatchExpr symb expression, ci)
/* Sjaak ... */ /* Sjaak ... */
convertDynamics cinp bound_vars default_expr (DynamicExpr {dyn_expr, dyn_info_ptr, dyn_type_code}) ci=:{ci_symb_ident} convertDynamics cinp bound_vars default_expr (DynamicExpr {dyn_expr, dyn_info_ptr, dyn_type_code}) ci=:{ci_symb_ident}
# (dyn_expr, ci) = convertDynamics cinp bound_vars default_expr dyn_expr ci # (dyn_expr, ci) = convertDynamics cinp bound_vars default_expr dyn_expr ci
......
...@@ -211,7 +211,7 @@ where ...@@ -211,7 +211,7 @@ where
= weightedRefCountOfCase rci case_expr case_info { rs & rcs_expr_heap = rcs_expr_heap } = weightedRefCountOfCase rci case_expr case_info { rs & rcs_expr_heap = rcs_expr_heap }
weightedRefCount rci expr=:(BasicExpr _) rs weightedRefCount rci expr=:(BasicExpr _) rs
= rs = rs
weightedRefCount rci (MatchExpr _ constructor expr) rs weightedRefCount rci (MatchExpr constructor expr) rs
= weightedRefCount rci expr rs = weightedRefCount rci expr rs
weightedRefCount rci (Selection opt_tuple expr selections) rs weightedRefCount rci (Selection opt_tuple expr selections) rs
= weightedRefCount rci (expr, selections) rs = weightedRefCount rci (expr, selections) rs
...@@ -456,9 +456,9 @@ where ...@@ -456,9 +456,9 @@ where
= (fun_expr @ exprs, ds) = (fun_expr @ exprs, ds)
distributeLets depth expr=:(BasicExpr _) ds distributeLets depth expr=:(BasicExpr _) ds
= (expr, ds) = (expr, ds)
distributeLets depth (MatchExpr opt_tuple constructor expr) ds distributeLets depth (MatchExpr constructor expr) ds
# (expr, ds) = distributeLets depth expr ds # (expr, ds) = distributeLets depth expr ds
= (MatchExpr opt_tuple constructor expr, ds) = (MatchExpr constructor expr, ds)
distributeLets depth (Selection opt_tuple expr selectors) ds distributeLets depth (Selection opt_tuple expr selectors) ds
# (expr, ds) = distributeLets depth expr ds # (expr, ds) = distributeLets depth expr ds
# (selectors, ds) = distributeLets depth selectors ds # (selectors, ds) = distributeLets depth selectors ds
...@@ -1036,9 +1036,9 @@ where ...@@ -1036,9 +1036,9 @@ where
convertCases ci (Let lad) cs convertCases ci (Let lad) cs
# (lad, cs) = convertCases ci lad cs # (lad, cs) = convertCases ci lad cs
= (Let lad, cs) = (Let lad, cs)
convertCases ci (MatchExpr opt_tuple constructor expr) cs convertCases ci (MatchExpr constructor expr) cs
# (expr, cs) = convertCases ci expr cs # (expr, cs) = convertCases ci expr cs
= (MatchExpr opt_tuple constructor expr, cs) = (MatchExpr constructor expr, cs)
convertCases ci (Selection is_unique expr selectors) cs convertCases ci (Selection is_unique expr selectors) cs
# (expr, cs) = convertCases ci expr cs # (expr, cs) = convertCases ci expr cs
(selectors, cs) = convertCases ci selectors cs (selectors, cs) = convertCases ci selectors cs
...@@ -1236,9 +1236,9 @@ where ...@@ -1236,9 +1236,9 @@ where
= (Conditional cond, cp_info) = (Conditional cond, cp_info)
copy expr=:(BasicExpr _) cp_info copy expr=:(BasicExpr _) cp_info
= (expr, cp_info) = (expr, cp_info)
copy (MatchExpr opt_tuple constructor expr) cp_info copy (MatchExpr constructor expr) cp_info
# (expr, cp_info) = copy expr cp_info # (expr, cp_info) = copy expr cp_info
= (MatchExpr opt_tuple constructor expr, cp_info) = (MatchExpr constructor expr, cp_info)
copy (Selection is_unique expr selectors) cp_info copy (Selection is_unique expr selectors) cp_info
# (expr, cp_info) = copy expr cp_info # (expr, cp_info) = copy expr cp_info
(selectors, cp_info) = copy selectors cp_info (selectors, cp_info) = copy selectors cp_info
......
...@@ -660,7 +660,7 @@ instance check_completeness Expression where ...@@ -660,7 +660,7 @@ instance check_completeness Expression where
= ccs = ccs
check_completeness (ABCCodeExpr _ _) _ ccs check_completeness (ABCCodeExpr _ _) _ ccs
= ccs = ccs
check_completeness (MatchExpr _ constructor expression) cci ccs check_completeness (MatchExpr constructor expression) cci ccs
= check_completeness expression cci = check_completeness expression cci
(check_whether_ident_is_imported constructor.glob_object.ds_ident STE_Constructor cci ccs) (check_whether_ident_is_imported constructor.glob_object.ds_ident STE_Constructor cci ccs)
check_completeness (FreeVar _) _ ccs check_completeness (FreeVar _) _ ccs
......
...@@ -4038,9 +4038,9 @@ mapExprSt f (Conditional cond=:{if_cond, if_then, if_else}) st ...@@ -4038,9 +4038,9 @@ mapExprSt f (Conditional cond=:{if_cond, if_then, if_else}) st
No -> (No, st) No -> (No, st)
= f (Conditional {cond & if_cond = if_cond, if_then = if_then, if_else = if_else}) st = f (Conditional {cond & if_cond = if_cond, if_then = if_then, if_else = if_else}) st
mapExprSt f (MatchExpr x y expr) st mapExprSt f (MatchExpr y expr) st
# (expr, st) = mapExprSt f expr st # (expr, st) = mapExprSt f expr st
= f (MatchExpr x y expr) st = f (MatchExpr y expr) st
mapExprSt f (DynamicExpr dyn=:{dyn_expr}) st mapExprSt f (DynamicExpr dyn=:{dyn_expr}) st
# (dyn_expr, st) = mapExprSt f dyn_expr st # (dyn_expr, st) = mapExprSt f dyn_expr st
...@@ -4145,7 +4145,7 @@ where ...@@ -4145,7 +4145,7 @@ where
collect_expr_calls (TupleSelect ds i expr) rest = collect_expr_calls expr rest collect_expr_calls (TupleSelect ds i expr) rest = collect_expr_calls expr rest
//collect_expr_calls (Lambda fvs expr) rest = collect_expr_calls expr rest //collect_expr_calls (Lambda fvs expr) rest = collect_expr_calls expr rest
collect_expr_calls (Conditional cond) rest = collect_expr_calls cond.if_cond (collect_expr_calls cond.if_then (foldOptional id collect_expr_calls cond.if_else rest)) collect_expr_calls (Conditional cond) rest = collect_expr_calls cond.if_cond (collect_expr_calls cond.if_then (foldOptional id collect_expr_calls cond.if_else rest))
collect_expr_calls (MatchExpr ogds gds expr) rest = collect_expr_calls expr rest collect_expr_calls (MatchExpr gds expr) rest = collect_expr_calls expr rest
collect_expr_calls (DynamicExpr dyn) rest = collect_expr_calls dyn.dyn_expr (collect_tce_calls dyn.dyn_type_code rest) collect_expr_calls (DynamicExpr dyn) rest = collect_expr_calls dyn.dyn_expr (collect_tce_calls dyn.dyn_type_code rest)
//collect_expr_calls (TypeCase tc) rest = collect_expr_calls tc.type_case_dynamic (foldr collect_dp_calls (foldOptional id collect_expr_calls rest) tc.type_case_patterns) //collect_expr_calls (TypeCase tc) rest = collect_expr_calls tc.type_case_dynamic (foldr collect_dp_calls (foldOptional id collect_expr_calls rest) tc.type_case_patterns)
collect_expr_calls (TypeCodeExpression tce) rest = collect_tce_calls tce rest collect_expr_calls (TypeCodeExpression tce) rest = collect_tce_calls tce rest
......
...@@ -1408,9 +1408,9 @@ where ...@@ -1408,9 +1408,9 @@ where
| isEmpty uni_vars | isEmpty uni_vars
= (DynamicExpr { dyn & dyn_expr = dyn_expr, dyn_type_code = type_code }, ui) = (DynamicExpr { dyn & dyn_expr = dyn_expr, dyn_type_code = type_code }, ui)
= (DynamicExpr { dyn & dyn_expr = dyn_expr, dyn_type_code = TCE_UniType uni_vars type_code }, ui) = (DynamicExpr { dyn & dyn_expr = dyn_expr, dyn_type_code = TCE_UniType uni_vars type_code }, ui)
updateExpression group_index (MatchExpr opt_tuple cons_symbol expr) ui updateExpression group_index (MatchExpr cons_symbol expr) ui
# (expr, ui) = updateExpression group_index expr ui # (expr, ui) = updateExpression group_index expr ui
= (MatchExpr opt_tuple cons_symbol expr, ui) = (MatchExpr cons_symbol expr, ui)
updateExpression group_index (TupleSelect symbol argn_nr expr) ui updateExpression group_index (TupleSelect symbol argn_nr expr) ui
# (expr, ui) = updateExpression group_index expr ui # (expr, ui) = updateExpression group_index expr ui
= (TupleSelect symbol argn_nr expr, ui) = (TupleSelect symbol argn_nr expr, ui)
......
...@@ -2,10 +2,6 @@ definition module predef ...@@ -2,10 +2,6 @@ definition module predef
import syntax, hashtable import syntax, hashtable
cPredefinedModuleIndex :== 1
PD_StringTypeIndex :== 0
:: PredefinedSymbols :== {# PredefinedSymbol} :: PredefinedSymbols :== {# PredefinedSymbol}
:: PredefinedSymbol = { :: PredefinedSymbol = {
...@@ -13,6 +9,12 @@ PD_StringTypeIndex :== 0 ...@@ -13,6 +9,12 @@ PD_StringTypeIndex :== 0
pds_def :: !Index pds_def :: !Index
} }
cPredefinedModuleIndex :== 1
PD_StringTypeIndex :== 0
PD_Arity2TupleTypeIndex :== 8
PD_Arity32TupleTypeIndex :== 38
/* identifiers not present the hastable */ /* identifiers not present the hastable */
PD_PredefinedModule :== 0 PD_PredefinedModule :== 0
......
...@@ -2,10 +2,6 @@ implementation module predef ...@@ -2,10 +2,6 @@ implementation module predef
import syntax, hashtable, type_io_common import syntax, hashtable, type_io_common
cPredefinedModuleIndex :== 1
PD_StringTypeIndex :== 0
:: PredefinedSymbols :== {# PredefinedSymbol} :: PredefinedSymbols :== {# PredefinedSymbol}
:: PredefinedSymbol = { :: PredefinedSymbol = {
...@@ -13,6 +9,12 @@ PD_StringTypeIndex :== 0 ...@@ -13,6 +9,12 @@ PD_StringTypeIndex :== 0
pds_def :: !Index pds_def :: !Index
} }
cPredefinedModuleIndex :== 1
PD_StringTypeIndex :== 0
PD_Arity2TupleTypeIndex :== 8
PD_Arity32TupleTypeIndex :== 38
/* identifiers not present the hashtable */ /* identifiers not present the hashtable */
PD_PredefinedModule :== 0 PD_PredefinedModule :== 0
......
...@@ -250,7 +250,7 @@ where ...@@ -250,7 +250,7 @@ where
refMark free_vars sel _ (TupleSelect _ arg_nr expr) var_heap refMark free_vars sel _ (TupleSelect _ arg_nr expr) var_heap
= refMark free_vars arg_nr No expr var_heap = refMark free_vars arg_nr No expr var_heap
refMark free_vars sel _ (MatchExpr _ _ expr) var_heap refMark free_vars sel _ (MatchExpr _ expr) var_heap
= refMark free_vars sel No expr var_heap = refMark free_vars sel No expr var_heap
refMark free_vars sel _ EE var_heap refMark free_vars sel _ EE var_heap
= var_heap = var_heap
......
...@@ -115,7 +115,7 @@ instance == FunctionOrMacroIndex ...@@ -115,7 +115,7 @@ instance == FunctionOrMacroIndex
, def_macro_indices :: !IndexRange , def_macro_indices :: !IndexRange
, def_classes :: ![ClassDef] , def_classes :: ![ClassDef]
, def_members :: ![MemberDef] , def_members :: ![MemberDef]
, def_generics :: ![GenericDef] // AA , def_generics :: ![GenericDef]
, def_funtypes :: ![FunType] , def_funtypes :: ![FunType]
, def_instances :: ![instance_kind] , def_instances :: ![instance_kind]
} }
...@@ -167,7 +167,7 @@ cIsNotAFunction :== False ...@@ -167,7 +167,7 @@ cIsNotAFunction :== False
| PD_Type ParsedTypeDef | PD_Type ParsedTypeDef
| PD_TypeSpec Position Ident Priority (Optional SymbolType) Specials | PD_TypeSpec Position Ident Priority (Optional SymbolType) Specials
| PD_Class ClassDef [ParsedDefinition] | PD_Class ClassDef [ParsedDefinition]
| PD_Generic GenericDef // AA | PD_Generic GenericDef
| PD_Instance (ParsedInstance ParsedDefinition) | PD_Instance (ParsedInstance ParsedDefinition)
| PD_Instances [ParsedInstance ParsedDefinition] | PD_Instances [ParsedInstance ParsedDefinition]
| PD_Import [ParsedImport] | PD_Import [ParsedImport]
...@@ -1104,7 +1104,6 @@ cIsNotStrict :== False ...@@ -1104,7 +1104,6 @@ cIsNotStrict :== False
= NormalSelector = NormalSelector
| NormalSelectorUniqueElementResult | NormalSelectorUniqueElementResult
| UniqueSelector // ! | UniqueSelector // !
(Global DefinedSymbol) // tuple type
/* /*
:: SelectorKind = SEK_Normal | SEK_First | SEK_Next | SEK_Last :: SelectorKind = SEK_Normal | SEK_First | SEK_Next | SEK_Last
...@@ -1128,7 +1127,7 @@ cIsNotStrict :== False ...@@ -1128,7 +1127,7 @@ cIsNotStrict :== False
| AnyCodeExpr !(CodeBinding BoundVar) !(CodeBinding FreeVar) ![String] | AnyCodeExpr !(CodeBinding BoundVar) !(CodeBinding FreeVar) ![String]
| ABCCodeExpr ![String] !Bool | ABCCodeExpr ![String] !Bool
| MatchExpr !(Optional (Global DefinedSymbol)) !(Global DefinedSymbol) !Expression | MatchExpr !(Global DefinedSymbol) !Expression
| FreeVar FreeVar | FreeVar FreeVar
| Constant !SymbIdent !Int !Priority !Bool /* auxiliary clause used during checking */ | Constant !SymbIdent !Int !Priority !Bool /* auxiliary clause used during checking */
| ClassVariable !VarInfoPtr /* auxiliary clause used during overloading */ | ClassVariable !VarInfoPtr /* auxiliary clause used during overloading */
...@@ -1359,10 +1358,7 @@ ParsedInstanceToClassInstance pi members :== ...@@ -1359,10 +1358,7 @@ ParsedInstanceToClassInstance pi members :==
{ ins_class = {glob_object = MakeDefinedSymbol pi.pi_class NoIndex (length pi.pi_types), glob_module = NoIndex}, ins_ident = pi.pi_ident, { ins_class = {glob_object = MakeDefinedSymbol pi.pi_class NoIndex (length pi.pi_types), glob_module = NoIndex}, ins_ident = pi.pi_ident,
ins_type = { it_vars = [], it_types = pi.pi_types, it_attr_vars = [], ins_type = { it_vars = [], it_types = pi.pi_types, it_attr_vars = [],
it_context = pi.pi_context }, ins_members = members, ins_specials = pi.pi_specials, ins_pos = pi.pi_pos, it_context = pi.pi_context }, ins_members = members, ins_specials = pi.pi_specials, ins_pos = pi.pi_pos,
/*AA*/ ins_is_generic = False, ins_generate = pi.pi_generate, ins_partial = False,
ins_is_generic = False,
ins_generate = pi.pi_generate,
ins_partial = False,
ins_generic = {glob_module = NoIndex, glob_object = NoIndex}} ins_generic = {glob_module = NoIndex, glob_object = NoIndex}}
MakeTypeDef name lhs rhs attr contexts pos :== MakeTypeDef name lhs rhs attr contexts pos :==
......
...@@ -1095,7 +1095,6 @@ cIsNotStrict :== False ...@@ -1095,7 +1095,6 @@ cIsNotStrict :== False
= NormalSelector = NormalSelector
| NormalSelectorUniqueElementResult | NormalSelectorUniqueElementResult
| UniqueSelector // ! | UniqueSelector // !
(Global DefinedSymbol) // tuple type
:: Expression = Var !BoundVar :: Expression = Var !BoundVar
| App !App | App !App
...@@ -1113,7 +1112,7 @@ cIsNotStrict :== False ...@@ -1113,7 +1112,7 @@ cIsNotStrict :== False
| AnyCodeExpr !(CodeBinding BoundVar) !(CodeBinding FreeVar) ![String] | AnyCodeExpr !(CodeBinding BoundVar) !(CodeBinding FreeVar) ![String]
| ABCCodeExpr ![String] !Bool | ABCCodeExpr ![String] !Bool
| MatchExpr !(Optional (Global DefinedSymbol)) !(Global DefinedSymbol) !Expression | MatchExpr !(Global DefinedSymbol) !Expression
| FreeVar FreeVar | FreeVar FreeVar
| Constant !SymbIdent !Int !Priority !Bool /* auxiliary clause used during checking */ | Constant !SymbIdent !Int !Priority !Bool /* auxiliary clause used during checking */
| ClassVariable !VarInfoPtr /* auxiliary clause used during overloading */ | ClassVariable !VarInfoPtr /* auxiliary clause used during overloading */
...@@ -1592,7 +1591,7 @@ where ...@@ -1592,7 +1591,7 @@ where
(<<<) file (TupleSelect field field_nr expr) = file <<< expr <<<'.' <<< field_nr (<<<) file (TupleSelect field field_nr expr) = file <<< expr <<<'.' <<< field_nr
// (<<<) file (Lambda vars expr) = file <<< '\\' <<< vars <<< " -> " <<< expr // (<<<) file (Lambda vars expr) = file <<< '\\' <<< vars <<< " -> " <<< expr
(<<<) file WildCard = file <<< '_' (<<<) file WildCard = file <<< '_'
(<<<) file (MatchExpr _ cons expr) = file <<< cons <<< " =: " <<< expr (<<<) file (MatchExpr cons expr) = file <<< cons <<< " =: " <<< expr
(<<<) file EE = file <<< "** E **" (<<<) file EE = file <<< "** E **"
(<<<) file (NoBind _) = file <<< "** NB **" (<<<) file (NoBind _) = file <<< "** NB **"
(<<<) file (DynamicExpr {dyn_expr,dyn_type_code}) = file <<< "dynamic " <<< dyn_expr <<< " :: " <<< dyn_type_code (<<<) file (DynamicExpr {dyn_expr,dyn_type_code}) = file <<< "dynamic " <<< dyn_expr <<< " :: " <<< dyn_type_code
...@@ -1660,7 +1659,7 @@ instance <<< SelectorKind ...@@ -1660,7 +1659,7 @@ instance <<< SelectorKind
where where
(<<<) file NormalSelector = file <<< "." (<<<) file NormalSelector = file <<< "."
(<<<) file NormalSelectorUniqueElementResult = file <<< "!*" (<<<) file NormalSelectorUniqueElementResult = file <<< "!*"
(<<<) file (UniqueSelector _) = file <<< "!" (<<<) file UniqueSelector = file <<< "!"
instance <<< Selection instance <<< Selection
where where
...@@ -2056,7 +2055,7 @@ where ...@@ -2056,7 +2055,7 @@ where
= file <<< "argument " <<< (elem_nr + 1) <<< " of " <<< ds_arity <<< "-tuple" = file <<< "argument " <<< (elem_nr + 1) <<< " of " <<< ds_arity <<< "-tuple"
show_expression file (BasicExpr bv) show_expression file (BasicExpr bv)
= file <<< bv = file <<< bv
show_expression file (MatchExpr _ _ expr) show_expression file (MatchExpr _ expr)
= file <<< "match expression" = file <<< "match expression"
show_expression file _ show_expression file _
= file = file
......
...@@ -266,7 +266,7 @@ instance consumerRequirements Expression where ...@@ -266,7 +266,7 @@ instance consumerRequirements Expression where
= consumerRequirements case_expr common_defs ai = consumerRequirements case_expr common_defs ai
consumerRequirements (BasicExpr _) _ ai consumerRequirements (BasicExpr _) _ ai
= (cPassive, False, ai) = (cPassive, False, ai)
consumerRequirements (MatchExpr _ _ expr) common_defs ai consumerRequirements (MatchExpr _ expr) common_defs ai
= consumerRequirements expr common_defs ai = consumerRequirements expr common_defs ai
consumerRequirements (Selection _ expr selectors) common_defs ai consumerRequirements (Selection _ expr selectors) common_defs ai
# (cc, _, ai) = consumerRequirements expr common_defs ai # (cc, _, ai) = consumerRequirements expr common_defs ai
...@@ -778,9 +778,9 @@ where ...@@ -778,9 +778,9 @@ where
transform (TupleSelect a1 arg_nr expr) ro ti transform (TupleSelect a1 arg_nr expr) ro ti
# (expr,ti) = transform expr ro ti # (expr,ti) = transform expr ro ti
= (TupleSelect a1 arg_nr expr,ti) = (TupleSelect a1 arg_nr expr,ti)
transform (MatchExpr a1 a2 expr) ro ti transform (MatchExpr a1 expr) ro ti
# (expr,ti) = transform expr ro ti # (expr,ti) = transform expr ro ti
= (MatchExpr a1 a2 expr,ti) = (MatchExpr a1 expr,ti)
transform (DynamicExpr dynamic_expr) ro ti transform (DynamicExpr dynamic_expr) ro ti
# (dynamic_expr, ti) = transform dynamic_expr ro ti # (dynamic_expr, ti) = transform dynamic_expr ro ti
= (DynamicExpr dynamic_expr, ti) = (DynamicExpr dynamic_expr, ti)
...@@ -2976,7 +2976,7 @@ where ...@@ -2976,7 +2976,7 @@ where
= free_variables_of_fields fields var fvi = free_variables_of_fields fields var fvi
freeVariables (TupleSelect _