diff options
author | zweije | 2001-10-08 14:28:43 +0000 |
---|---|---|
committer | zweije | 2001-10-08 14:28:43 +0000 |
commit | 7d6d9294f29501da3cb82ba0c35a476d980c1af9 (patch) | |
tree | b9b49ac9ac46e9b57122e961457efc6fb12dae08 | |
parent | universally quantified attribute variables in typedefs added (diff) |
This commit was generated by cvs2svn to compensate for changes in r834,
which included commits to RCS files with non-trunk default branches.
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@835 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | sucl/basic.dcl | 3 | ||||
-rw-r--r-- | sucl/basic.icl | 6 | ||||
-rw-r--r-- | sucl/history.icl | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sucl/basic.dcl b/sucl/basic.dcl index 3972d39..188d8d0 100644 --- a/sucl/basic.dcl +++ b/sucl/basic.dcl @@ -218,3 +218,6 @@ zipwith :: (.a .b->.c) ![.a] [.b] -> [.c] // Write a list of things, each one terminated by a newline (writeList) infixl :: !*File [a] -> .File | <<< a + +// Prettyprint a list to a file with indent +printlist :: (elem->String) String [elem] *File -> .File diff --git a/sucl/basic.icl b/sucl/basic.icl index aa78e19..e6beaa0 100644 --- a/sucl/basic.icl +++ b/sucl/basic.icl @@ -323,3 +323,9 @@ zipwith f xs ys = [f x y \\ x<-xs & y<-ys] (writeList) file [] = file (writeList) file [x:xs] = file <<< x <<< nl writeList xs + +printlist :: (elem->String) String [elem] *File -> .File +printlist showelem indent [] file += file +printlist showelem indent [x:xs] file += printlist showelem indent xs (file <<< indent <<< showelem x <<< nl) diff --git a/sucl/history.icl b/sucl/history.icl index c0975a9..8713904 100644 --- a/sucl/history.icl +++ b/sucl/history.icl @@ -97,9 +97,3 @@ printhistoryassociation showsym showvar indent vargraphs file myshowrgraph showsym showvar rgraph = hd (printgraphBy showsym showvar (rgraphgraph rgraph) [rgraphroot rgraph]) - -printlist :: (elem->String) String [elem] *File -> .File -printlist showelem indent [] file -= file -printlist showelem indent [x:xs] file -= printlist showelem indent xs (file <<< indent <<< showelem x <<< nl) |