Commit e50ebd2d authored by John van Groningen's avatar John van Groningen
Browse files

remove code for compatibility with Clean 1.3

parent fd3ffcfc
......@@ -8,12 +8,7 @@ arrayConcat a1 a2
where
r2={r1 & [i+s1]=a2.[i] \\ i<-[0..s2-1]}
r1={r0 & [i]=a1.[i] \\ i<-[0..s1-1]}
/*2.0
r0=_createArray (s1+s2)
0.2*/
//1.3
r0=_createArrayc (s1+s2)
//3.1
s1=size a1
s2=size a2
......@@ -22,12 +17,7 @@ arrayPlusList a l
where
r2={r1 & [i+s1]=e \\ i<-[0..s2-1] & e<-l}
r1={r0 & [i]=a.[i] \\ i<-[0..s1-1]}
/*2.0
r0=_createArray (s1+s2)
0.2*/
//1.3
r0=_createArrayc (s1+s2)
//3.1
s1=size a
s2=length l
......@@ -36,12 +26,7 @@ arrayPlusRevList a l
where
r2={r1 & [sr-i]=e \\ i<-[1..s2] & e<-l}
r1={r0 & [i]=a.[i] \\ i<-[0..s1-1]}
/*2.0
r0=_createArray sr
0.2*/
//1.3
r0=_createArrayc sr
//3.1
sr=s1+s2
s1=size a
s2=length l
......@@ -49,12 +34,7 @@ where
arrayCopyBegin a s
:== copy_elements a r0 0
where
/*2.0
r0=_createArray s
0.2*/
//1.3
r0=_createArrayc s
//3.1
copy_elements a1 a2 i
| i<size a2
# (e,a1) = a1![i]
......@@ -68,12 +48,7 @@ arrayCopy a
= usize a
arrayAndElementsCopy place_holder copy_element_function array
/*2.0
:== copy place_holder array1 (_createArray n) 0 n
0.2*/
//1.3
:== copy place_holder array1 (_createArrayc n) 0 n
//3.1
where
(n, array1)
= usize array
......
......@@ -7,12 +7,7 @@ arrayConcat a1 a2
where
r2={r1 & [i+s1]=a2.[i] \\ i<-[0..s2-1]}
r1={r0 & [i]=a1.[i] \\ i<-[0..s1-1]}
/*2.0
r0=_createArray (s1+s2)
0.2*/
//1.3
r0=_createArrayc (s1+s2)
//3.1
s1=size a1
s2=size a2
......@@ -21,12 +16,7 @@ arrayPlusList a l
where
r2={r1 & [i+s1]=e \\ i<-[0..s2-1] & e<-l}
r1={r0 & [i]=a.[i] \\ i<-[0..s1-1]}
/*2.0
r0=_createArray (s1+s2)
0.2*/
//1.3
r0=_createArrayc (s1+s2)
//3.1
s1=size a
s2=length l
......@@ -35,12 +25,7 @@ arrayPlusRevList a l
where
r2={r1 & [sr-i]=e \\ i<-[1..s2] & e<-l}
r1={r0 & [i]=a.[i] \\ i<-[0..s1-1]}
/*2.0
r0=_createArray sr
0.2*/
//1.3
r0=_createArrayc sr
//3.1
sr=s1+s2
s1=size a
s2=length l
......@@ -48,12 +33,7 @@ where
arrayCopyBegin a s
:== copy_elements a r0 0
where
/*2.0
r0=_createArray s
0.2*/
//1.3
r0=_createArrayc s
//3.1
copy_elements a1 a2 i
| i<size a2
# (e,a1) = a1![i]
......@@ -67,12 +47,7 @@ arrayCopy a
= usize a
arrayAndElementsCopy place_holder copy_element_function array
/*2.0
:== copy place_holder array1 (_createArray n) 0 n
0.2*/
//1.3
:== copy place_holder array1 (_createArrayc n) 0 n
//3.1
where
(n, array1)
= usize array
......
......@@ -7,12 +7,8 @@ import checksupport
import checktypes
import check
import analtypes
/*2.0
from transform import ::Group
0.2*/
//1.3
from transform import Group
//3.1
// whether to generate CONS
// (needed for function that use CONS, like toString)
......
......@@ -30,13 +30,8 @@ where
instance WriteTypeInfo CommonDefs, Char, [a] | WriteTypeInfo a
instance WriteTypeInfo StrictnessList
/*2.0
instance WriteTypeInfo {#b} | Array {#} b & WriteTypeInfo b
0.2*/
//1.3
instance WriteTypeInfo {#b} | select_u, size_u, WriteTypeInfo b
//3.1
instance WriteTypeInfo {#b} | Array {#} b & WriteTypeInfo b
instance WriteTypeInfo (a,b) | WriteTypeInfo a & WriteTypeInfo b
......
definition module utilities
// compile with "reuse unique nodes"
/*2.0
from StdEnv import class Eq, not, class Ord, class IncDec
0.2*/
//1.3
from StdEnv import Eq, not, Ord, IncDec
//3.1
from StdClass import class Eq, not, class Ord, class IncDec
import StdMisc, general
import StdMisc, general, _aconcat
import _aconcat
/*
For Strings
*/
//1.3
from StdString import String
//3.1
stringToCharList :: !String -> [Char]
charListToString :: ![Char] -> String
revCharListToString :: !Int ![Char] -> String
......
// this is for Windows
definition module CoclSystemDependent
//1.3
from StdString import String
from StdFile import Files
//3.1
/*2.0
from StdFile import ::Files
0.2*/
// RWS split
// from deltaIOSystem import DeviceSystem
......
definition module set_return_code;
//1.3
from StdString import String;
//3.1
:: *UniqueWorld :== World;
set_return_code :: !Int !UniqueWorld -> UniqueWorld;
// void set_return_code (int return_code);
......@@ -3,12 +3,7 @@
*/
definition module compile
/*2.0
from StdFile import ::Files
0.2*/
//1.3
from StdFile import Files
//3.1
import checksupport
compile :: ![{#Char}] !*DclCache !*Files -> (!Bool,!*DclCache,!*Files)
......
......@@ -7,12 +7,7 @@
*/
definition module filesystem
/*2.0
from StdFile import class FileSystem,::Files
0.2*/
//1.3
from StdFile import FileSystem, Files
//3.1
// return last modified time (local time) as "yyyymmddhhmmss" or "" on error
fmodificationtime :: {#Char} !*env -> (!{#Char}, !*env) | FileSystem env
......
Markdown is supported
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