diff options
author | ronny | 2002-09-20 08:40:45 +0000 |
---|---|---|
committer | ronny | 2002-09-20 08:40:45 +0000 |
commit | 97560231e2b243d0dd3cac4b689c8cf37eaa192f (patch) | |
tree | 168bca9727288fc90dda4baac8e9159a1098d24a | |
parent | bug fixed: check if overloading is solved in type codes, removed some unused ... (diff) |
switch to 2.0 syntax, remove duplicated definitions from icl modules
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1200 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | backend/backendconvert.dcl | 5 | ||||
-rw-r--r-- | backend/backendconvert.icl | 6 | ||||
-rw-r--r-- | backend/backendpreprocess.icl | 5 | ||||
-rw-r--r-- | backend/backendsupport.dcl | 6 | ||||
-rw-r--r-- | backend/backendsupport.icl | 70 | ||||
-rw-r--r-- | frontend/convertDynamics.icl | 5 | ||||
-rw-r--r-- | frontend/convertcases.icl | 5 | ||||
-rw-r--r-- | frontend/frontend.dcl | 8 | ||||
-rw-r--r-- | frontend/frontend.icl | 27 | ||||
-rw-r--r-- | frontend/mergecases.icl | 4 |
10 files changed, 3 insertions, 138 deletions
diff --git a/backend/backendconvert.dcl b/backend/backendconvert.dcl index 5d9434b..9a178af 100644 --- a/backend/backendconvert.dcl +++ b/backend/backendconvert.dcl @@ -3,12 +3,7 @@ */ definition module backendconvert -/*2.0 from backend import ::BackEnd -0.2*/ -//1.3 -from backend import BackEnd -//3.1 import frontend backEndConvertModules :: PredefinedSymbols FrontEndSyntaxTree !Int *VarHeap *AttrVarHeap *BackEnd -> (!*VarHeap, *AttrVarHeap, !*BackEnd) diff --git a/backend/backendconvert.icl b/backend/backendconvert.icl index 5a44492..31a89a5 100644 --- a/backend/backendconvert.icl +++ b/backend/backendconvert.icl @@ -654,14 +654,8 @@ class declare a :: ModuleIndex a -> BackEnder class declareWithIndex a :: Index ModuleIndex a -> BackEnder -//1.3 -instance declare {#a} | declareWithIndex a & ArrayElem a where - declare :: ModuleIndex {#a} -> BackEnder | declareWithIndex a & ArrayElem a -//3.1 -/*2.0 instance declare {#a} | declareWithIndex a & Array {#} a where declare :: ModuleIndex {#a} -> BackEnder | declareWithIndex a & Array {#} a -0.2*/ declare moduleIndex array = foldStateWithIndexA (\i -> declareWithIndex i moduleIndex) array diff --git a/backend/backendpreprocess.icl b/backend/backendpreprocess.icl index 9689a83..bc2e84b 100644 --- a/backend/backendpreprocess.icl +++ b/backend/backendpreprocess.icl @@ -21,12 +21,7 @@ class preprocess a :: !Ident a -> Preprocessor :: PreprocessState :== VarHeap -//1.3 -instance preprocess {#a} | preprocess a & ArrayElem a where -//3.1 -/*2.0 instance preprocess {#a} | preprocess a & Array {#} a where -0.2*/ preprocess aliasDummyId array = foldStateA (preprocess aliasDummyId) array diff --git a/backend/backendsupport.dcl b/backend/backendsupport.dcl index bd95fa1..45ac506 100644 --- a/backend/backendsupport.dcl +++ b/backend/backendsupport.dcl @@ -3,14 +3,8 @@ */ definition module backendsupport -/*2.0 from StdArray import class Array(size,usize) from StdInt import class +,class == -0.2*/ -//1.3 -from StdArray import size, size_u -from StdInt import +, == -//3.1 from StdFunc import `bind` import utilities diff --git a/backend/backendsupport.icl b/backend/backendsupport.icl index ba7677b..a7c9bee 100644 --- a/backend/backendsupport.icl +++ b/backend/backendsupport.icl @@ -2,73 +2,3 @@ module owner: Ronny Wichers Schreur */ implementation module backendsupport - -import StdArray -/*2.0 -from StdInt import class + (..),class == (..) -0.2*/ -//1.3 -from StdInt import +, == -//3.1 -from StdFunc import `bind` - -identity - :== \x -> x - -// binding sugar -(==>) infix -(==>) f g - :== f `bind` g - -// o` :== flip o -(o`) infixr -(o`) f g - :== \x -> g (f x) - -(:-) infixl -(:-) a f - :== f a - -foldState function list - :== foldState list - where - foldState [] - = identity - foldState [hd:tl] - = function hd - o` foldState tl - -foldStateA function array - :== foldStateA 0 - where - arraySize - = size array - foldStateA index - | index == arraySize - = identity - // otherwise - = function array.[index] - o` foldStateA (index+1) - -foldStateWithIndexA function array - :== foldStateWithIndexA 0 - where - arraySize - = size array - foldStateWithIndexA index - | index == arraySize - = identity - // otherwise - = function index array.[index] - o` foldStateWithIndexA (index+1) - -foldrA function result array - :== foldrA 0 - where - arraySize - = size array - foldrA index - | index == arraySize - = result - // otherwise - = function array.[index] (foldrA (index+1)) diff --git a/frontend/convertDynamics.icl b/frontend/convertDynamics.icl index 20cc02c..9ab46a1 100644 --- a/frontend/convertDynamics.icl +++ b/frontend/convertDynamics.icl @@ -150,13 +150,8 @@ convertDynamicPatternsIntoUnifyAppls global_type_instances common_defs main_dcl_ = case tcl_file of No -> (No,type_heaps,ci_predef_symb) -/*2.0 _ # tcl_file = f tcl_file; -0.2*/ -//1.3 - (Yes tcl_file) -//3.1 # (ok,tcl_file,type_heaps,ci_predef_symb) = write_tcl_file main_dcl_module_n dcl_mods icl_mod.icl_common tcl_file directly_imported_dcl_modules global_type_instances ci_type_constructor_used_in_dynamic_patterns type_heaps ci_predef_symb | not ok diff --git a/frontend/convertcases.icl b/frontend/convertcases.icl index 3fa1ff6..c8822ad 100644 --- a/frontend/convertcases.icl +++ b/frontend/convertcases.icl @@ -1729,11 +1729,6 @@ splitGuards (BasicPatterns basicType patterns) splitGuards (OverloadedListPatterns type decons_expr patterns) = [OverloadedListPatterns type decons_expr [pattern] \\ pattern <- patterns] -:: TypedVariable = - { tv_free_var :: !FreeVar - , tv_type :: !AType - } - copyExpression :: ![TypedVariable] !Expression !*VarHeap -> (![Expression], ![TypedVariable], ![FreeVar], !Expression, !*VarHeap) copyExpression bound_vars expr var_heap # var_heap = foldSt (\{tv_free_var={fv_info_ptr},tv_type} -> writePtr fv_info_ptr (VI_BoundVar tv_type)) bound_vars var_heap diff --git a/frontend/frontend.dcl b/frontend/frontend.dcl index bccf65b..171d1c3 100644 --- a/frontend/frontend.dcl +++ b/frontend/frontend.dcl @@ -3,14 +3,8 @@ */ definition module frontend -/*2.0 from scanner import ::SearchPaths -from general import ::Optional, Yes, No -0.2*/ -//1.3 -from scanner import SearchPaths -from general import Optional, Yes, No -//3.1 +from general import ::Optional (Yes, No) import checksupport, transform, overloading :: FrontEndOptions diff --git a/frontend/frontend.icl b/frontend/frontend.icl index 9ecb140..66c1e6e 100644 --- a/frontend/frontend.icl +++ b/frontend/frontend.icl @@ -8,32 +8,11 @@ import scanner, parse, postparse, check, type, trans, convertcases, overloading, //import print -:: FrontEndOptions - = { feo_up_to_phase :: !FrontEndPhase - , feo_generics :: !Bool - , feo_fusion :: !Bool - } - -:: FrontEndSyntaxTree - = { fe_icl :: !IclModule - , fe_dcls :: !{#DclModule} - , fe_components :: !{!Group} - , fe_arrayInstances :: !ArrayAndListInstances - } - // trace macro (-*->) infixl (-*->) value trace :== value // ---> trace -:: FrontEndPhase - = FrontEndPhaseCheck - | FrontEndPhaseTypeCheck - | FrontEndPhaseConvertDynamics - | FrontEndPhaseTransformGroups - | FrontEndPhaseConvertModules - | FrontEndPhaseAll - instance == FrontEndPhase where (==) a b = equal_constructor a b @@ -409,12 +388,6 @@ where show_dcl_function {ft_symb, ft_type} file = file <<< ft_symb <<< " :: " <<< ft_type <<< "\n" - -:: ListTypesKind = ListTypesNone | ListTypesInferred | ListTypesStrictExports | ListTypesAll -:: ListTypesOption = - { lto_showAttributes :: Bool - , lto_listTypesKind :: ListTypesKind - } instance == ListTypesKind where (==) ListTypesNone ListTypesNone = True diff --git a/frontend/mergecases.icl b/frontend/mergecases.icl index 452c002..193a933 100644 --- a/frontend/mergecases.icl +++ b/frontend/mergecases.icl @@ -120,10 +120,10 @@ where -> (Yes cees, var_heap, symbol_heap) No -*/ + -> (No, var_heap, symbol_heap) _ - -> (No, var_heap, symbol_heap) +*/ -> (No, var_heap, symbol_heap) | otherwise = (No, var_heap, symbol_heap) split_case split_var_info_ptr (Let lad=:{let_expr,let_strict_binds,let_lazy_binds}) var_heap symbol_heap |