diff options
author | zweije | 2001-08-17 14:18:07 +0000 |
---|---|---|
committer | zweije | 2001-08-17 14:18:07 +0000 |
commit | 80a63c3b2543b3e504b5357eb4c38063bf23fd85 (patch) | |
tree | f2c688af6c11239351512a23706a4334d246bcec | |
parent | This commit was generated by cvs2svn to compensate for changes in r652, (diff) |
This commit was generated by cvs2svn to compensate for changes in r654,
which included commits to RCS files with non-trunk default branches.
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@655 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | sucl/basic.dcl | 3 | ||||
-rw-r--r-- | sucl/basic.icl | 3 | ||||
-rw-r--r-- | sucl/graph.icl | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/sucl/basic.dcl b/sucl/basic.dcl index 27c170d..c6057ec 100644 --- a/sucl/basic.dcl +++ b/sucl/basic.dcl @@ -82,6 +82,9 @@ indent :: .String -> .([.String] -> .[String]) // `Identifiers' is the list of all identifiers identifiers :: [String] +// `Inccounter m f' increments counting function f by one at point m. +inccounter :: a (a->b) a -> b | == a & +,one b + // `Intersect xs ys' is the intersection of list `ys' with list `xs'. intersect :: ![elem] [elem] -> .[elem] | == elem diff --git a/sucl/basic.icl b/sucl/basic.icl index 0953741..7ba2c51 100644 --- a/sucl/basic.icl +++ b/sucl/basic.icl @@ -109,6 +109,9 @@ forget :: val -> .(![.(val,res)] -> .[(val,res)]) | == val forget x = filter (neq x o fst) neq x y = x <> y +inccounter :: a (a->b) a -> b | == a & +,one b +inccounter m f n = if (n==m) (f n+one) (f n) + indent :: .String -> .([.String] -> .[String]) indent first = map2 (+++) [first:repeat (createArray (size first) ' ')] diff --git a/sucl/graph.icl b/sucl/graph.icl index 2929125..076220b 100644 --- a/sucl/graph.icl +++ b/sucl/graph.icl @@ -178,8 +178,6 @@ refcount graph roots where count` = inccounter var count (def,(_,args)) = varcontents graph var -inccounter m f n = if (n==m) (f n+1) (f n) - /* Compilegraph compiles a graph from parts. |