dynamic_string.icl 337 Bytes
Newer Older
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
1
implementation module dynamic_string
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
2

Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
3 4
import StdDynamic
import StdEnv
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
5

6
import graph_copy
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
7

Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
8
dynamic_to_string :: !Dynamic -> *{#Char}
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
9
dynamic_to_string d
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
10
	= copy_to_string d
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
11

Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
12
string_to_dynamic :: *{#Char} -> .Dynamic
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
13
string_to_dynamic s
Rinus Plasmeijer's avatar
Rinus Plasmeijer committed
14 15 16 17 18 19
	# (d,_) = copy_from_string s
	= d


mk_unique :: !{#Char} -> *{#Char}
mk_unique s = {s` \\ s` <-: s}