Skip to content

add condition over os_type to preproc #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cbor/containers_cbor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let to_string_diagnostic (self : t) : string =
Format.asprintf "@[<h>%a@]" pp_diagnostic self

(* we use funtions from Bytes *)
[@@@ifge 4.08]
[@@@if ge 4.08]

exception Indefinite

Expand Down
2 changes: 1 addition & 1 deletion src/cbor/containers_cbor.mli
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ val pp_diagnostic : t CCFormat.printer
val to_string_diagnostic : t -> string

(* we use funtions from Bytes *)
[@@@ifge 4.08]
[@@@if ge 4.08]

val encode : ?buf:Buffer.t -> t -> string
val decode : string -> (t, string) result
Expand Down
2 changes: 1 addition & 1 deletion src/cbor/tests/t_appendix_a.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let verbose = try Sys.getenv "VERBOSE" = "1" with _ -> false

[@@@ifge 4.08]
[@@@if ge 4.08]

module J = Yojson.Safe
module Fmt = CCFormat
Expand Down
6 changes: 3 additions & 3 deletions src/core/CCArray.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ type 'a printer = Format.formatter -> 'a -> unit

open CCShims_

[@@@ifge 4.8]
[@@@if ge 4.8]

include Array

[@@@elifge 4.6]
[@@@elif ge 4.6]

include Array

Expand Down Expand Up @@ -542,7 +542,7 @@ module Infix = struct
let ( -- ) = ( -- )
let ( --^ ) = ( --^ )

[@@@ifge 4.8]
[@@@if ge 4.8]

type 'a t = 'a array

Expand Down
6 changes: 3 additions & 3 deletions src/core/CCArray.mli
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ type 'a printer = Format.formatter -> 'a -> unit

(** {2 Arrays} *)

[@@@ifge 4.8]
[@@@if ge 4.8]

include module type of Array
(** @inline
{{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module}*)

[@@@elifge 4.6]
[@@@elif ge 4.6]

include module type of Array
(** @inline
Expand Down Expand Up @@ -333,7 +333,7 @@ module Infix : sig
(** [x --^ y] creates an array containing integers in the range [x .. y]. Right bound excluded.
@since 0.17 *)

[@@@ifge 4.8]
[@@@if ge 4.8]

include CCShims_syntax.LET with type 'a t := 'a array
(** Let operators on OCaml >= 4.08.0, nothing otherwise
Expand Down
6 changes: 3 additions & 3 deletions src/core/CCArrayLabels.mli
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ type 'a printer = Format.formatter -> 'a -> unit

(** {2 Arrays} *)

[@@@ifge 4.8]
[@@@if ge 4.8]

include module type of ArrayLabels with module Floatarray = Array.Floatarray
(** @inline
{{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module}*)

[@@@elifge 4.6]
[@@@elif ge 4.6]

include module type of ArrayLabels with module Floatarray = Array.Floatarray
(** @inline
Expand Down Expand Up @@ -347,7 +347,7 @@ module Infix : sig
(** [x --^ y] creates an array containing integers in the range [x .. y]. Right bound excluded.
@since 0.17 *)

[@@@ifge 4.8]
[@@@if ge 4.8]

include CCShims_syntax.LET with type 'a t := 'a array
(** Let operators on OCaml >= 4.08.0, nothing otherwise
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCAtomic.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@@@ifge 4.12]
[@@@if ge 4.12]

include Atomic

Expand Down
2 changes: 1 addition & 1 deletion src/core/CCFormat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ let mark_close_style st : string =
else
""

[@@@ifge 4.8]
[@@@if ge 4.8]

type stag += Style of ANSI_codes.style list

Expand Down
2 changes: 1 addition & 1 deletion src/core/CCFormat.mli
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ module ANSI_codes : sig
is a very shiny style. *)
end

[@@@ifge 4.8]
[@@@if ge 4.8]

val styling : ANSI_codes.style list -> 'a printer -> 'a printer
(** [styling st p] is the same printer as [p], except it locally sets
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCFun.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let opaque_identity x = x
include Sys
include CCShims_.Stdlib

[@@@ifge 4.8]
[@@@if ge 4.8]

include Fun

Expand Down
2 changes: 1 addition & 1 deletion src/core/CCFun.mli
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(** Basic operations on Functions *)

[@@@ifge 4.8]
[@@@if ge 4.8]

include module type of Fun
(** @inline *)
Expand Down
4 changes: 2 additions & 2 deletions src/core/CCInt.ml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(* This file is free software, part of containers. See file "license" for more details. *)

[@@@ifge 4.07]
[@@@if ge 4.07]
[@@@else_]

module Stdlib = Pervasives

[@@@endif]
[@@@ifge 4.08]
[@@@if ge 4.08]

include Int

Expand Down
2 changes: 1 addition & 1 deletion src/core/CCInt.mli
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(** Basic Int functions *)

[@@@ifge 4.08]
[@@@if ge 4.08]

include module type of Int
(** @inline
Expand Down
4 changes: 2 additions & 2 deletions src/core/CCList.ml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ let rec assq_opt x = function

(* end of backport *)

[@@@ifge 4.8]
[@@@if ge 4.8]

include List

Expand Down Expand Up @@ -1470,7 +1470,7 @@ module Infix = struct
let ( -- ) = ( -- )
let ( --^ ) = ( --^ )

[@@@ifge 4.8]
[@@@if ge 4.8]

let ( let+ ) = ( >|= )
let ( let* ) = ( >>= )
Expand Down
4 changes: 2 additions & 2 deletions src/core/CCList.mli
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type 'a gen = unit -> 'a option
type 'a printer = Format.formatter -> 'a -> unit
type 'a random_gen = Random.State.t -> 'a

[@@@ifge 4.8]
[@@@if ge 4.8]

include module type of List with type 'a t := 'a list
(** @inline
Expand Down Expand Up @@ -983,7 +983,7 @@ module Infix : sig
(** [i --^ j] is the infix alias for [range']. Second bound [j] excluded.
@since 0.17 *)

[@@@ifge 4.08]
[@@@if ge 4.08]

include CCShims_syntax.LET with type 'a t := 'a t
(** @inline *)
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCOption.ml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module Infix = struct
let ( <$> ) = map
let ( <+> ) = ( <+> )

[@@@ifge 4.8]
[@@@if ge 4.8]

let ( let+ ) = ( >|= )
let ( let* ) = ( >>= )
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCOption.mli
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ module Infix : sig
val ( <+> ) : 'a t -> 'a t -> 'a t
(** [o1 <+> o2] is [o1] if [o1] is [Some _], [o2] if [o1] is [None]. *)

[@@@ifge 4.08]
[@@@if ge 4.08]

include CCShims_syntax.LET with type 'a t := 'a t
(** Let operators on OCaml >= 4.08.0, nothing otherwise
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCParse.ml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ module Infix = struct
let ( ||| ) = both
let[@inline] ( <?> ) p msg = set_error_message msg p

[@@@ifge 4.8]
[@@@if ge 4.8]

let ( let+ ) = ( >|= )
let ( let* ) = ( >>= )
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCParse.mli
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ module Infix : sig
[a ||| b] parses [a], then [b], then returns the pair of their results.
@since 3.6 *)

[@@@ifge 4.08]
[@@@if ge 4.08]

include CCShims_syntax.LET with type 'a t := 'a t
(** Let operators on OCaml >= 4.08.0, nothing otherwise
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCRandom.ml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ let fix ?(sub1 = []) ?(sub2 = []) ?(subn = []) ~base fuel st =
let pure x _st = x
let ( <*> ) f g st = f st (g st)

[@@@ifge 4.8]
[@@@if ge 4.8]

let ( let+ ) = ( >|= )
let ( let* ) = ( >>= )
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCRandom.mli
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ val fix :
val pure : 'a -> 'a t
val ( <*> ) : ('a -> 'b) t -> 'a t -> 'b t

[@@@ifge 4.08]
[@@@if ge 4.08]

include CCShims_syntax.LET with type 'a t := 'a t
(** Let operators on OCaml >= 4.08.0, nothing otherwise
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCResult.ml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ module Infix = struct
let ( >>= ) e f = flat_map f e
let ( <*> ) = ( <*> )

[@@@ifge 4.8]
[@@@if ge 4.8]

let ( let+ ) = ( >|= )
let ( let* ) = ( >>= )
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCResult.mli
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ module Infix : sig
[Ok (a b)]. Otherwise, it fails, and the error of [a] is chosen
over the error of [b] if both fail. *)

[@@@ifge 4.08]
[@@@if ge 4.08]

val ( let+ ) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
(** @since 2.8 *)
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCShims_.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@@@ifge 4.07]
[@@@if ge 4.07]

module Stdlib = Stdlib

Expand Down
2 changes: 1 addition & 1 deletion src/core/CCShims_syntax.mli
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@@@ifge 4.8]
[@@@if ge 4.8]

(** Let operators on OCaml >= 4.08.0, nothing otherwise
@since 2.8
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCString.ml
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ module Split = struct
let right ~by s = try Some (right_exn ~by s) with Not_found -> None
end

[@@@ifge 4.04]
[@@@if ge 4.04]
[@@@else_]

let split_on_char c s : _ list =
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCUnit.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@@@ifge 4.08]
[@@@if ge 4.08]

include Unit

Expand Down
2 changes: 1 addition & 1 deletion src/core/CCVector.ml
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ let pp ?(pp_start = fun _ () -> ()) ?(pp_stop = fun _ () -> ())
v;
pp_stop fmt ()

[@@@ifge 4.8]
[@@@if ge 4.8]

let ( let+ ) = ( >|= )
let ( let* ) = ( >>= )
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCVector.mli
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ val pp :
By defaults [pp_start] and [pp_stop] does nothing and [pp_sep] defaults to
(fun out -> Format.fprintf out ",@ "). *)

[@@@ifge 4.08]
[@@@if ge 4.08]

val ( let+ ) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
(** @since 2.8 *)
Expand Down
Loading