diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-09-02 14:40:57 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-09-02 14:40:57 -0400 |
commit | 2a572eeba9d521400872e6588b3f709818a5d412 (patch) | |
tree | 2b719447badc70a7b852f0091f68fad273d9e9c5 /src/print.sml | |
parent | 3b770e100b11cbcfc19af6f810962975e9221d9f (diff) |
Validating schema of a live database
Diffstat (limited to 'src/print.sml')
-rw-r--r-- | src/print.sml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/print.sml b/src/print.sml index 3917a998..7329c44d 100644 --- a/src/print.sml +++ b/src/print.sml @@ -59,6 +59,19 @@ fun p_list_sep sep f ls = end fun p_list f = p_list_sep (box [PD.string ",", space]) f +fun p_list_sepi sep f ls = + case ls of + [] => PD.string "" + | [x] => f 0 x + | x :: rest => + let + val tokens = ListUtil.foldri (fn (n, x, tokens) => + sep :: PD.cut :: f (n + 1) x :: tokens) + [] rest + in + box (f 0 x :: tokens) + end + fun fprint f d = (PD.description (f, d); PD.PPS.flushStream f) val print = fprint out |