## ansi-term-prettyprint.sml
## All rights reserved.
# Compiled by:
#
src/lib/prettyprint/big/devices/prettyprint-devices.sublibstipulate
package fil = file__premicrothread; # file__premicrothread is from
src/lib/std/src/posix/file--premicrothread.pkgherein
package ansiterm_pp: (weak)
api {
package tok: api {
include Prettyprint_Token # Prettyprint_Token is from
src/lib/prettyprint/big/src/prettyprint-token.api where
Style == ansi_terminal_device::Style;
token: ((ansi_terminal_device::Style, String)) -> Token;
};
include Prettyprint_Stream # Prettyprint_Stream is from
src/lib/prettyprint/big/src/prettyprint-stream.api where Device == ansi_terminal_device::Device
where Style == ansi_terminal_device::Style
where Token == tok::Token;
open: { dst: fil::Output_Stream, wid: Int } -> Stream;
}
{
package tok
=
package {
Style = ansi_terminal_device::Style; # ansi_terminal_device is from
src/lib/prettyprint/big/devices/ansi-term-dev.pkg Token = TOK ((Style, String));
fun string (TOK (sty, s)) = s;
fun style (TOK (sty, s)) = sty;
fun size (TOK (sty, s)) = string::length s;
token = TOK;
};
package pp
=
prettyprint_stream_g ( # prettyprint_stream_g is from
src/lib/prettyprint/big/src/prettyprint-stream-g.pkg package token = tok;
package device= ansi_terminal_device; # ansi_terminal_device is from
src/lib/prettyprint/big/devices/ansi-term-dev.pkg );
include pp;
fun open arg
=
open_stream (ansi_terminal_device::open_device arg);
};
end;
## COPYRIGHT (c) 2005 John Reppy (http://www.cs.uchicago.edu/~jhr)
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2013,
## released per terms of SMLNJ-COPYRIGHT.