aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-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
5 files changed, 4 insertions, 74 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