1 (* Copyright (C
) 2017 Matthew Fluet
.
2 * Copyright (C
) 1999-2008 Henry Cejtin
, Matthew Fluet
, Suresh
3 * Jagannathan
, and Stephen Weeks
.
4 * Copyright (C
) 1997-2000 NEC Research Institute
.
6 * MLton is released under a BSD
-style license
.
7 * See the file MLton
-LICENSE for details
.
10 structure BindingStrength
=
18 structure LayoutPretty
=
20 type t
= Layout
.t
* ({isChar
: bool} * BindingStrength
.t
)
22 fun simple (l
: Layout
.t
): t
=
23 (l
, ({isChar
= false}, BindingStrength
.Unit
))
25 val dontCare
: t
= simple (Layout
.str
"_")
26 fun bracket ((l
, ({isChar
}, _
)): t
): t
=
27 (Layout
.seq
[Layout
.str
"[", l
, Layout
.str
"]"],
28 ({isChar
= isChar
}, BindingStrength
.Unit
))