-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
92 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
type index = Main | Extra of int | ||
type index = Main_message | Extra_remark of int | ||
type t = index * Text.t | ||
let priority = | ||
function | ||
| Main, _ -> -1 | ||
| Extra i, _ -> i | ||
| Main_message, _ -> -1 | ||
| Extra_remark i, _ -> i | ||
let compare t1 t2 = | ||
Utils.compare_pair Int.compare Stdlib.compare | ||
(priority t1, t1) (priority t2, t2) | ||
let dump fmt = | ||
function | ||
| Main, _ -> Format.pp_print_string fmt "Main" | ||
| Extra i, _ -> Format.fprintf fmt "Extra %d" i | ||
| Main_message, _ -> Format.pp_print_string fmt "Main" | ||
| Extra_remark i, _ -> Format.fprintf fmt "Extra %d" i |