-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1091 from ocaml/compiler-version-predicates
Extract predicates for compiler versions
- Loading branch information
Showing
6 changed files
with
58 additions
and
17 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
type t = int * int * int | ||
|
||
let of_ocaml_config ocfg = | ||
Ocaml_config.version ocfg | ||
|
||
let supports_no_keep_locs version = | ||
version >= (4, 03, 0) | ||
|
||
let supports_opaque_for_mli version = | ||
version >= (4, 03, 0) | ||
|
||
let always_reads_alias_cmi version = | ||
version < (4, 03, 0) | ||
|
||
let supports_color_in_ocamlparam version = | ||
version >= (4, 03, 0) | ||
|
||
let supports_ocaml_color version = | ||
version >= (4, 05, 0) |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(** Version numbers for ocamlc and ocamlopt *) | ||
type t | ||
|
||
val of_ocaml_config : Ocaml_config.t -> t | ||
|
||
(** Does this support [-no-keep-locs]? *) | ||
val supports_no_keep_locs : t -> bool | ||
|
||
(** Does this support [-opaque] for [.mli] files? *) | ||
val supports_opaque_for_mli : t -> bool | ||
|
||
(** Does it read the [.cmi] file of module alias | ||
even when [-no-alias-deps] is passed? *) | ||
val always_reads_alias_cmi : t -> bool | ||
|
||
(** Does this support ['color'] in [OCAMLPARAM]? *) | ||
val supports_color_in_ocamlparam : t -> bool | ||
|
||
(** Does this support [OCAML_COLOR]? *) | ||
val supports_ocaml_color : t -> bool |