Sign in

    prettyprinter

    A pretty printer library for MoonBit using immutable deque implementation for efficient document layout and formatting

    pretty-printer
    formatting
    document
    layout
    text-processing
    Download zip
    Version
    0.1.1
    License
    Apache-2.0
    Last updated
    last year
    Downloads
    44

    #illusory0x0/prettyprinter

    A pretty printer library used immutable deque implementation.

    IsString

    pub(open) trait IsString : Show {
    length(Self) -> Int
    write_string(Self, Logger) -> Unit
    }

    impl IsString for String
    impl IsString for View

    Doc

    type Doc

    impl Show for Doc

    Doc::empty

    fn Doc::empty() -> Doc

    Doc::envelop

    fn Doc::envelop(self : Doc, left~ : IsString, right~ : IsString) -> Doc

    Doc::from_iter

    fn Doc::from_iter(iter : Iter[Line]) -> Doc

    Doc::from_line

    fn Doc::from_line(line : Line) -> Doc

    Doc::from_string

    fn Doc::from_string(str : IsString) -> Doc

    Doc::height

    fn Doc::height(self : Doc) -> Int

    Doc::indent

    fn Doc::indent(self : Doc, n : Int) -> Doc

    Doc::indent_rest

    fn Doc::indent_rest(self : Doc, n : Int) -> Doc

    Doc::join

    fn Doc::join(self : Doc, separator~ : IsString) -> Line

    Doc::joinline

    fn Doc::joinline(self : Doc, separator? : IsString?, bot : Doc) -> Doc

    Doc::lastline_width

    fn Doc::lastline_width(self : Doc) -> Int

    Doc::new

    Doc::vertical_concat

    fn Doc::vertical_concat(self : Doc, other : Doc) -> Doc

    Doc::width

    fn Doc::width(self : Doc) -> Int

    Line

    type Line

    Line::append

    fn Line::append(self : Line, other : Line) -> Line

    Line::cons

    fn Line::cons(self : Line, text : IsString) -> Line

    Line::empty

    fn Line::empty() -> Line

    Line::from_iter

    fn Line::from_iter(indentation? : Int, iter : Iter[IsString]) -> Line

    Line::from_string

    fn Line::from_string(indentation? : Int, str : IsString) -> Line

    Line::indent

    fn Line::indent(self : Line, n : Int) -> Line

    Line::iter

    fn Line::iter(self : Line) -> Iter[IsString]

    Line::new

    fn Line::new(indentation? : Int, deque :
    T
    [IsString]) -> Line

    Line::snoc

    fn Line::snoc(self : Line, text : IsString) -> Line

    Line::width

    fn Line::width(self : Line) -> Int

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io