added an intro lemma for freshness of products; set up
the simplifier so that it can deal with the compact and
long notation for freshness constraints (FIXME: it should
also be able to deal with the special case of freshness
of atoms)
(* Title: Pure/General/buffer.ML
ID: $Id$
Author: Markus Wenzel, TU Muenchen
Efficient string buffers.
*)
signature BUFFER =
sig
type T
val empty: T
val add: string -> T -> T
val content: T -> string
val write: Path.T -> T -> unit
end;
structure Buffer: BUFFER =
struct
datatype T = Buffer of string list;
val empty = Buffer [];
fun add "" buf = buf
| add x (Buffer xs) = Buffer (x :: xs);
fun content (Buffer xs) = implode (rev xs);
fun write path (Buffer xs) = File.write_list path (rev xs);
end;