output: canonical argument order (as opposed to write);
authorwenzelm
Thu Apr 03 21:23:36 2008 +0200 (2008-04-03)
changeset 265456e1aef001b3b
parent 26544 af4c77a21c06
child 26546 ba4cdf92c7c4
output: canonical argument order (as opposed to write);
src/Pure/General/buffer.ML
     1.1 --- a/src/Pure/General/buffer.ML	Thu Apr 03 18:42:42 2008 +0200
     1.2 +++ b/src/Pure/General/buffer.ML	Thu Apr 03 21:23:36 2008 +0200
     1.3 @@ -13,7 +13,7 @@
     1.4    val add_substring: substring -> T -> T
     1.5    val markup: Markup.T -> (T -> T) -> T -> T
     1.6    val content: T -> string
     1.7 -  val output: TextIO.outstream -> T -> unit
     1.8 +  val output: T -> TextIO.outstream -> unit
     1.9    val write: Path.T -> T -> unit
    1.10  end;
    1.11  
    1.12 @@ -55,13 +55,13 @@
    1.13    | rev_buffer (String (s, buf)) acc = rev_buffer buf (String (s, acc))
    1.14    | rev_buffer (Substring (s, buf)) acc = rev_buffer buf (Substring (s, acc));
    1.15  
    1.16 -fun output stream buffer =
    1.17 +fun output buffer stream =
    1.18    let
    1.19      fun rev_output EmptyBuffer = ()
    1.20        | rev_output (String (s, buf)) = (TextIO.output (stream, s); rev_output buf)
    1.21        | rev_output (Substring (s, buf)) = (TextIO.outputSubstr (stream, s); rev_output buf);
    1.22    in rev_output (rev_buffer buffer empty) end;
    1.23  
    1.24 -fun write path buf = File.open_output (fn stream => output stream buf) path;
    1.25 +fun write path buf = File.open_output (output buf) path;
    1.26  
    1.27  end;