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 /backend | |
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
Diffstat (limited to 'backend')
-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 |
5 files changed, 0 insertions, 92 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)) |