diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-29 01:00:30 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-29 01:00:30 -0800 |
commit | afb467ea0270c59f9fdcad9fe5303d0ed526177c (patch) | |
tree | a8254143010d612908b9b4cc534bf4ab1da199a7 /070text.mu | |
parent | c9b98c21ffea7a2e48e10e01b80dabad42641e57 (diff) | |
download | mu-afb467ea0270c59f9fdcad9fe5303d0ed526177c.tar.gz |
2606 - handle cycles inside stash
The idea is that to-text-line should truncate blindly past some threshold, even if to-text isn't smart enough to avoid infinite loops. Maybe I should define a 'truncating buffer' which stops once it fills up. That would be an easy way to eliminate all infinite loops in to-text-line.
Diffstat (limited to '070text.mu')
-rw-r--r-- | 070text.mu | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/070text.mu b/070text.mu index eb3875d0..5de21e41 100644 --- a/070text.mu +++ b/070text.mu @@ -1,6 +1,14 @@ # Some useful helpers for dealing with text (arrays of characters) -# to-text gets called implicitly in various places +# to-text-line gets called implicitly in various places +# define it to be identical to 'to-text' by default +recipe to-text-line x:_elem -> y:address:array:character [ + local-scope + load-ingredients + y <- to-text x +] + +# to-text on text is just the identity function recipe to-text x:address:array:character -> y:address:array:character [ local-scope load-ingredients |