diff options
-rw-r--r-- | backend/backendconvert.icl | 4 | ||||
-rw-r--r-- | frontend/analunitypes.icl | 2 | ||||
-rw-r--r-- | frontend/check.icl | 3 | ||||
-rw-r--r-- | frontend/checkgenerics.icl | 2 | ||||
-rw-r--r-- | frontend/checksupport.dcl | 2 | ||||
-rw-r--r-- | frontend/checktypes.dcl | 2 | ||||
-rw-r--r-- | frontend/classify.icl | 5 | ||||
-rw-r--r-- | frontend/convertDynamics.dcl | 3 | ||||
-rw-r--r-- | frontend/convertDynamics.icl | 10 | ||||
-rw-r--r-- | frontend/expand_types.dcl | 8 | ||||
-rw-r--r-- | frontend/expand_types.icl | 16 | ||||
-rw-r--r-- | frontend/overloading.icl | 2 | ||||
-rw-r--r-- | frontend/partition.icl | 2 | ||||
-rw-r--r-- | frontend/predef.icl | 3 | ||||
-rw-r--r-- | frontend/scanner.icl | 2 | ||||
-rw-r--r-- | frontend/syntax.dcl | 13 | ||||
-rw-r--r-- | frontend/syntax.icl | 4 | ||||
-rw-r--r-- | frontend/trans.icl | 2 | ||||
-rw-r--r-- | frontend/typesupport.dcl | 2 | ||||
-rw-r--r-- | main/coclmain.icl | 5 |
20 files changed, 35 insertions, 57 deletions
diff --git a/backend/backendconvert.icl b/backend/backendconvert.icl index ddcd4da..6ea31f1 100644 --- a/backend/backendconvert.icl +++ b/backend/backendconvert.icl @@ -1,6 +1,3 @@ -/* - module owner: Ronny Wichers Schreur -*/ implementation module backendconvert import code from library "backend_library" @@ -9,7 +6,6 @@ import StdEnv, compare_types import frontend import backend import backendsupport, backendpreprocess -import partition // trace macro (-*->) infixl diff --git a/frontend/analunitypes.icl b/frontend/analunitypes.icl index 3220a40..ee086b5 100644 --- a/frontend/analunitypes.icl +++ b/frontend/analunitypes.icl @@ -1,7 +1,7 @@ implementation module analunitypes import StdEnv, compare_types -import syntax, checksupport, analtypes, typesupport, checktypes, utilities +import syntax, checksupport, analtypes, checktypes, utilities instance + SignClassification where diff --git a/frontend/check.icl b/frontend/check.icl index f22866b..76653c3 100644 --- a/frontend/check.icl +++ b/frontend/check.icl @@ -3,8 +3,7 @@ implementation module check import StdEnv, compare_types import syntax, expand_types, parse, checksupport, utilities, checktypes, transform, predef -import explicitimports, comparedefimp, checkFunctionBodies, containers -import genericsupport +import explicitimports, comparedefimp, checkFunctionBodies, containers, typesupport import typereify from checkgenerics import checkGenericDefs,checkGenericCaseDefs,convert_generic_instances,create_gencase_funtypes diff --git a/frontend/checkgenerics.icl b/frontend/checkgenerics.icl index 1051bf5..c4a05da 100644 --- a/frontend/checkgenerics.icl +++ b/frontend/checkgenerics.icl @@ -1,6 +1,6 @@ implementation module checkgenerics -import syntax,checksupport,checktypes,genericsupport,compare_types +import syntax,checksupport,checktypes,genericsupport,compare_types,typesupport checkGenericDefs :: !Index !(Optional (CopiedDefinitions, Int)) !*{#GenericDef} !*{#CheckedTypeDef} !*{#ClassDef} !*{#DclModule} !*Heaps !*CheckState diff --git a/frontend/checksupport.dcl b/frontend/checksupport.dcl index 7ca923f..b9ae928 100644 --- a/frontend/checksupport.dcl +++ b/frontend/checksupport.dcl @@ -1,7 +1,7 @@ definition module checksupport import StdEnv -import syntax, predef, containers, utilities +import syntax, predef, containers CS_NotChecked :== -1 NotFound :== -1 diff --git a/frontend/checktypes.dcl b/frontend/checktypes.dcl index 518d2b0..bb7f26c 100644 --- a/frontend/checktypes.dcl +++ b/frontend/checktypes.dcl @@ -1,6 +1,6 @@ definition module checktypes -import checksupport, typesupport +import checksupport checkTypeDefs :: !Index !(Optional (CopiedDefinitions, Int)) !*{#CheckedTypeDef} !*{#ConsDef} !*{#SelectorDef} !*{#DclModule} !*Heaps !*CheckState diff --git a/frontend/classify.icl b/frontend/classify.icl index 9075913..573e35a 100644 --- a/frontend/classify.icl +++ b/frontend/classify.icl @@ -1,13 +1,10 @@ -/* - module owner: Diederik van Arkel -*/ implementation module classify SwitchMultimatchClassification multi no_multi :== multi SwitchNewOld new old :== new import syntax -from partition import ::Component(..),::ComponentMembers(..) +from checksupport import ::Component(..),::ComponentMembers(..) from containers import arg_is_strict import utilities import StdStrictLists diff --git a/frontend/convertDynamics.dcl b/frontend/convertDynamics.dcl index 8ce0b52..b90b07f 100644 --- a/frontend/convertDynamics.dcl +++ b/frontend/convertDynamics.dcl @@ -2,9 +2,6 @@ definition module convertDynamics import syntax, checksupport -:: TypeCodeVariableInfo -:: DynamicValueAliasInfo - convertDynamicPatternsIntoUnifyAppls :: !{# CommonDefs} !Int {#DclModule} !IclModule [String] !Int !Int !*{!Component} !*{#FunDef} !*PredefinedSymbols !*VarHeap !*TypeHeaps !*ExpressionHeap !(Optional *File) -> (!*{#{#CheckedTypeDef}}, diff --git a/frontend/convertDynamics.icl b/frontend/convertDynamics.icl index 5469f19..8fab72d 100644 --- a/frontend/convertDynamics.icl +++ b/frontend/convertDynamics.icl @@ -1,22 +1,14 @@ -/* - module owner: Ronny Wichers Schreur -*/ implementation module convertDynamics import syntax from type_io_common import PredefinedModuleName + // Optional extended_unify_and_coerce no yes :== no; // change also _unify and _coerce in StdDynamic import type_io; -:: TypeCodeVariableInfo = TCI_TypeVar !Expression - | TCI_TypePatternVar !Expression - | TCI_SelectionsTypePatternVar ![(Expression,[Selection])] - -:: DynamicValueAliasInfo :== BoundVar - :: *ConversionState = { ci_predef_symb :: !*PredefinedSymbols , ci_var_heap :: !*VarHeap diff --git a/frontend/expand_types.dcl b/frontend/expand_types.dcl index 5d494fc..ae7ac5e 100644 --- a/frontend/expand_types.dcl +++ b/frontend/expand_types.dcl @@ -11,8 +11,8 @@ convertSymbolTypeWithoutExpandingAbstractSynTypes :: !Bool !{#CommonDefs} !Symbo !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
-> (!SymbolType, !Bool, !*ImportedTypes,!ImportedConstructors,!*TypeHeaps,!*VarHeap)
-convertSymbolTypeWithoutCollectingImportedConstructors :: !Bool !{# CommonDefs} !SymbolType !Int !*ImportedTypes !*TypeHeaps !*VarHeap
- -> (!SymbolType, !*ImportedTypes,!*TypeHeaps,!*VarHeap)
+convertSymbolTypeWithoutCollectingImportedConstructors :: !Bool !{#CommonDefs} !SymbolType !Int !*ImportedTypes !*TypeHeaps !*VarHeap
+ -> (!SymbolType,!*ImportedTypes,!*TypeHeaps,!*VarHeap)
addTypesOfDictionaries :: !{#CommonDefs} ![TypeContext] ![AType] -> [AType]
@@ -29,14 +29,14 @@ DontCollectImportedConstructors:==4 , ets_contains_unexpanded_abs_syn_type :: !Bool
}
-class expandSynTypes a :: !Int !{# CommonDefs} !a !*ExpandTypeState -> (!Bool,!a, !*ExpandTypeState)
+class expandSynTypes a :: !Int !{#CommonDefs} !a !*ExpandTypeState -> (!Bool,!a, !*ExpandTypeState)
instance expandSynTypes (a,b) | expandSynTypes a & expandSynTypes b special a=[AType],b=AType
class substitute a :: !a !*TypeHeaps -> (!a, !*TypeHeaps)
instance substitute Type,AType,TypeContext,AttrInequality,CaseType
-instance substitute [a] | substitute a special a=TypeContext
+instance substitute [a] | substitute a special a=AType; a=AttrInequality; a=TypeContext
instance substitute (a,b) | substitute a & substitute b special a=[AType],b=AType
class removeAnnotations a :: !a -> (!Bool, !a)
diff --git a/frontend/expand_types.icl b/frontend/expand_types.icl index d5e87eb..a8e4cc4 100644 --- a/frontend/expand_types.icl +++ b/frontend/expand_types.icl @@ -49,7 +49,7 @@ RemoveAnnotationsMask:==1 ExpandAbstractSynTypesMask:==2
DontCollectImportedConstructors:==4
-convertSymbolType :: !Bool !{#CommonDefs} !SymbolType !Int !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
+convertSymbolType :: !Bool !{#CommonDefs} !SymbolType !Int !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
-> (!SymbolType, !*ImportedTypes,!ImportedConstructors,!*TypeHeaps,!*VarHeap)
convertSymbolType rem_annots common_defs st main_dcl_module_n imported_types collected_imports type_heaps var_heap
# (st, ets_contains_unexpanded_abs_syn_type,ets_type_defs, ets_collected_conses, ets_type_heaps, ets_var_heap)
@@ -57,19 +57,19 @@ convertSymbolType rem_annots common_defs st main_dcl_module_n imported_types col = (st, ets_type_defs, ets_collected_conses, ets_type_heaps, ets_var_heap)
convertSymbolTypeWithoutExpandingAbstractSynTypes :: !Bool !{#CommonDefs} !SymbolType !Int
- !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
+ !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
-> (!SymbolType, !Bool, !*ImportedTypes,!ImportedConstructors,!*TypeHeaps,!*VarHeap)
convertSymbolTypeWithoutExpandingAbstractSynTypes rem_annots common_defs st main_dcl_module_n imported_types collected_imports type_heaps var_heap
- = convertSymbolType_ (if rem_annots (RemoveAnnotationsMask) 0) common_defs st main_dcl_module_n imported_types collected_imports type_heaps var_heap
+ = convertSymbolType_ (if rem_annots RemoveAnnotationsMask 0) common_defs st main_dcl_module_n imported_types collected_imports type_heaps var_heap
-convertSymbolTypeWithoutCollectingImportedConstructors :: !Bool !{# CommonDefs} !SymbolType !Int !*ImportedTypes !*TypeHeaps !*VarHeap
- -> (!SymbolType, !*ImportedTypes,!*TypeHeaps,!*VarHeap)
+convertSymbolTypeWithoutCollectingImportedConstructors :: !Bool !{#CommonDefs} !SymbolType !Int !*ImportedTypes !*TypeHeaps !*VarHeap
+ -> (!SymbolType,!*ImportedTypes,!*TypeHeaps,!*VarHeap)
convertSymbolTypeWithoutCollectingImportedConstructors rem_annots common_defs st main_dcl_module_n imported_types type_heaps var_heap
# (st, ets_contains_unexpanded_abs_syn_type,ets_type_defs, ets_collected_conses, ets_type_heaps, ets_var_heap)
- = convertSymbolType_ (if rem_annots (RemoveAnnotationsMask bitor ExpandAbstractSynTypesMask bitor DontCollectImportedConstructors) (ExpandAbstractSynTypesMask bitor DontCollectImportedConstructors)) common_defs st main_dcl_module_n imported_types [] type_heaps var_heap
+ = convertSymbolType_ (if rem_annots (RemoveAnnotationsMask bitor ExpandAbstractSynTypesMask bitor DontCollectImportedConstructors) (ExpandAbstractSynTypesMask bitor DontCollectImportedConstructors)) common_defs st main_dcl_module_n imported_types [] type_heaps var_heap
= (st, ets_type_defs, ets_type_heaps, ets_var_heap)
-convertSymbolType_ :: !Int !{# CommonDefs} !SymbolType !Int !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
+convertSymbolType_ :: !Int !{# CommonDefs} !SymbolType !Int !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
-> (!SymbolType, !Bool,!*ImportedTypes, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
convertSymbolType_ rem_annots common_defs st main_dcl_module_n imported_types collected_imports type_heaps var_heap
# ets = { ets_type_defs = imported_types
@@ -133,7 +133,7 @@ where , ets_contains_unexpanded_abs_syn_type :: !Bool
}
-class expandSynTypes a :: !Int !{# CommonDefs} !a !*ExpandTypeState -> (!Bool,!a, !*ExpandTypeState)
+class expandSynTypes a :: !Int !{#CommonDefs} !a !*ExpandTypeState -> (!Bool,!a, !*ExpandTypeState)
instance expandSynTypes Type
where
diff --git a/frontend/overloading.icl b/frontend/overloading.icl index 63bafc9..07b13ca 100644 --- a/frontend/overloading.icl +++ b/frontend/overloading.icl @@ -2,7 +2,7 @@ implementation module overloading import StdEnv, compare_types -import syntax, type, expand_types, utilities, unitype, predef, checktypes, convertDynamics +import syntax, type, expand_types, utilities, unitype, predef, checktypes import genericsupport, type_io_common :: LocalTypePatternVariable = diff --git a/frontend/partition.icl b/frontend/partition.icl index 0bcdfd5..233563e 100644 --- a/frontend/partition.icl +++ b/frontend/partition.icl @@ -3,7 +3,7 @@ */ implementation module partition -import syntax, transform +import syntax, transform, utilities // PARTITIONING diff --git a/frontend/predef.icl b/frontend/predef.icl index 5c7fc57..fb7c168 100644 --- a/frontend/predef.icl +++ b/frontend/predef.icl @@ -1,7 +1,6 @@ implementation module predef -import syntax, hashtable, type_io_common - +import syntax, hashtable (<<=) infixl (<<=) symbol_table val diff --git a/frontend/scanner.icl b/frontend/scanner.icl index e553d10..48f3d17 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -1,6 +1,6 @@ implementation module scanner -import StdEnv, compare_constructor, general, compilerSwitches +import StdEnv, compare_constructor, general from utilities import revCharListToString, isSpecialChar diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl index 0c7e306..7ce1a1a 100644 --- a/frontend/syntax.dcl +++ b/frontend/syntax.dcl @@ -5,7 +5,6 @@ import StdEnv import scanner, general, typeproperties, Heap import IndexType from containers import ::NumberSet -from convertDynamics import :: TypeCodeVariableInfo, :: DynamicValueAliasInfo from convertcases import :: LetVarInfo, :: LetExpressionInfo, :: RefCountsInCase, :: SplitsInCase :: Ident = @@ -707,8 +706,6 @@ pIsSafe :== True :: AP_Kind = APK_Constructor !Index | APK_NewTypeConstructor !Index | APK_Macro !Bool // is_dcl_macro -from convertDynamics import :: TypeCodeVariableInfo, :: DynamicValueAliasInfo - :: VI_TypeInfo = VITI_Empty | VITI_Coercion CoercionPosition | VITI_PatternType [AType] /*module*/!Index /*constructor*/!Index VI_TypeInfo @@ -740,7 +737,7 @@ from convertDynamics import :: TypeCodeVariableInfo, :: DynamicValueAliasInfo VI_Record ![AuxiliaryPattern] | VI_Pattern !AuxiliaryPattern | VI_TypeCodeVariable !TypeCodeVariableInfo | - VI_DynamicValueAlias !DynamicValueAliasInfo | + VI_DynamicValueAlias !BoundVar | VI_Body !SymbIdent !TransformedBody ![FreeVar] | /* used during fusion */ VI_ExpressionOrBody !Expression !SymbIdent !TransformedBody ![FreeVar] | /* used during fusion */ VI_Dictionary !SymbIdent ![Expression] !Type | /* used during fusion */ @@ -751,6 +748,11 @@ from convertDynamics import :: TypeCodeVariableInfo, :: DynamicValueAliasInfo | VI_Labelled_Empty !{#Char} // RWS debugging | VI_LocalLetVar // RWS, mark Let vars during case transformation +:: TypeCodeVariableInfo + = TCI_TypeVar !Expression + | TCI_TypePatternVar !Expression + | TCI_SelectionsTypePatternVar ![(Expression,[Selection])] + :: ExtendedVarInfo = EVI_VarType !AType :: ArgumentPosition :== Int @@ -758,9 +760,6 @@ from convertDynamics import :: TypeCodeVariableInfo, :: DynamicValueAliasInfo :: VarHeap :== Heap VarInfo :: VarInfoPtr :== Ptr VarInfo -from convertcases import :: LetVarInfo, :: LetExpressionInfo, - :: RefCountsInCase, :: SplitsInCase - cNotVarNumber :== -1 :: BoundVar = diff --git a/frontend/syntax.icl b/frontend/syntax.icl index 8c9acf5..a9b5666 100644 --- a/frontend/syntax.icl +++ b/frontend/syntax.icl @@ -2,7 +2,9 @@ implementation module syntax import StdEnv, compare_constructor import scanner, general, Heap, typeproperties, utilities -import syntax +import IndexType +from containers import ::NumberSet +from convertcases import :: LetVarInfo, :: LetExpressionInfo, :: RefCountsInCase, :: SplitsInCase instance toString Ident where toString {id_name} = id_name diff --git a/frontend/trans.icl b/frontend/trans.icl index fd4ef9e..e2ad3b8 100644 --- a/frontend/trans.icl +++ b/frontend/trans.icl @@ -2,7 +2,7 @@ implementation module trans import StdEnv -import syntax, transform, checksupport, compare_types, check, utilities, expand_types, unitype, typesupport, type +import syntax, transform, checksupport, compare_types, utilities, expand_types, unitype, type import classify, partition SwitchCaseFusion fuse dont_fuse :== fuse diff --git a/frontend/typesupport.dcl b/frontend/typesupport.dcl index df09e7a..8a83a64 100644 --- a/frontend/typesupport.dcl +++ b/frontend/typesupport.dcl @@ -1,6 +1,6 @@ definition module typesupport -import checksupport +import checksupport,utilities from unitype import ::Coercions, ::CoercionTree, ::AttributePartition, CT_Empty diff --git a/main/coclmain.icl b/main/coclmain.icl index 28a7de0..b63fd00 100644 --- a/main/coclmain.icl +++ b/main/coclmain.icl @@ -1,6 +1,3 @@ -/* - module owner: Ronny Wichers Schreur -*/ implementation module coclmain import StdEnv @@ -9,7 +6,7 @@ import ArgEnv import set_return_code import CoclSystemDependent -import compile +import compile,utilities coclMain :: ![{#Char}] !*World -> *World coclMain testArgs world |