Skip to content

Commit

Permalink
loc: add compare function
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Apr 18, 2019
1 parent 5ba8897 commit d194a44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/elpi_API.mli
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module Ast : sig
val pp : Format.formatter -> t -> unit
val show : t -> string
val equal : t -> t -> bool
val compare : t -> t -> int

val initial : string -> t
end
Expand Down
2 changes: 1 addition & 1 deletion src/elpi_util.ml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module Loc = struct
line: int;
line_starts_at: int;
}
[@@deriving eq]
[@@deriving eq, ord]

let to_string {
source_name;
Expand Down
1 change: 1 addition & 0 deletions src/elpi_util.mli
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ module Loc : sig
val show : t -> string
val pp : Format.formatter -> t -> unit
val equal : t -> t -> bool
val compare : t -> t -> int
val initial : string -> t
end

Expand Down

0 comments on commit d194a44

Please sign in to comment.