PreviousUpNext

15.3.343  src/lib/prettyprint/big/src/prettyprinter.api

## prettyprinter.api

# Compiled by:
#     src/lib/prettyprint/big/prettyprint.lib

stipulate
    package fil =  file__premicrothread;                                # file__premicrothread  is from   src/lib/std/src/posix/file--premicrothread.pkg
    package pp  =  prettyprint;                                         # prettyprint           is from   src/lib/prettyprint/big/src/prettyprint.pkg
herein

    api Prettyprinter {
        #
        Prettyprinter
            =
            { stream:      pp::Stream,
              text_stream: Null_Or( fil::Output_Stream ),

              align:   (Void -> Void) -> Void,
              wrap:    (Void -> Void) -> Void,

              align':   Int -> (Void -> Void) -> Void,
              wrap':    Int -> (Void -> Void) -> Void,

              flush:     Void -> Void,
              close:     Void -> Void,

              lit:       String -> Void,        # Output string literally -- no chars receive special treatment.
              out:       String -> Void,        # '\r'     == break { spaces => 3, indent_on_wrap => 0 }
              put:       String -> Void         # n blanks == break { spaces => n, indent_on_wrap => 4 }
            };  

        make_file_prettyprinter
            :
            String -> Prettyprinter;

    };
end;

## Code by Jeff Prothero: Copyright (c) 2010-2013,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext