aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/_aconcat.dcl25
-rw-r--r--frontend/_aconcat.icl25
-rw-r--r--frontend/generics.icl6
-rw-r--r--frontend/type_io.dcl7
-rw-r--r--frontend/utilities.dcl15
-rw-r--r--main/Windows/CoclSystemDependent.dcl6
-rw-r--r--main/Windows/set_return_code.dcl4
-rw-r--r--main/compile.dcl5
-rw-r--r--main/filesystem.dcl5
9 files changed, 4 insertions, 94 deletions
diff --git a/frontend/_aconcat.dcl b/frontend/_aconcat.dcl
index 316f284..6fcb387 100644
--- a/frontend/_aconcat.dcl
+++ b/frontend/_aconcat.dcl
@@ -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
diff --git a/frontend/_aconcat.icl b/frontend/_aconcat.icl
index 8259980..4bd758f 100644
--- a/frontend/_aconcat.icl
+++ b/frontend/_aconcat.icl
@@ -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
diff --git a/frontend/generics.icl b/frontend/generics.icl
index 9162aad..ef67407 100644
--- a/frontend/generics.icl
+++ b/frontend/generics.icl
@@ -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)
diff --git a/frontend/type_io.dcl b/frontend/type_io.dcl
index d9153f3..c5f45cb 100644
--- a/frontend/type_io.dcl
+++ b/frontend/type_io.dcl
@@ -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
diff --git a/frontend/utilities.dcl b/frontend/utilities.dcl
index cd822aa..bd11ea6 100644
--- a/frontend/utilities.dcl
+++ b/frontend/utilities.dcl
@@ -1,25 +1,14 @@
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
diff --git a/main/Windows/CoclSystemDependent.dcl b/main/Windows/CoclSystemDependent.dcl
index 03df339..9e90a32 100644
--- a/main/Windows/CoclSystemDependent.dcl
+++ b/main/Windows/CoclSystemDependent.dcl
@@ -1,13 +1,7 @@
// 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
diff --git a/main/Windows/set_return_code.dcl b/main/Windows/set_return_code.dcl
index e8ed7f8..bd7c48b 100644
--- a/main/Windows/set_return_code.dcl
+++ b/main/Windows/set_return_code.dcl
@@ -1,9 +1,5 @@
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);
diff --git a/main/compile.dcl b/main/compile.dcl
index 5e18ac8..e2ddeac 100644
--- a/main/compile.dcl
+++ b/main/compile.dcl
@@ -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)
diff --git a/main/filesystem.dcl b/main/filesystem.dcl
index 3b29e8a..1af48f5 100644
--- a/main/filesystem.dcl
+++ b/main/filesystem.dcl
@@ -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