package gospel

  1. Overview
  2. Docs

Module Gospel.UtilsSource

Sourceval split_at_f : ('a -> bool) -> 'a list -> 'a list * 'a list

split_at_f f l is the partition (l1, l2) such that l1 is the longest prefix where the predicate f holds. The order of the elements is not changed.

Sourceval split_at_i : int -> 'a list -> 'a list * 'a list

split_at_i i l is the partition (l1, l2) such that l1 contains the first i elements. The order of the elements is not changed.

Sourcemodule Fmt : sig ... end
Sourceexception TypeCheckingError of string
Sourceexception NotSupported of string
Sourceexception Located of Ppxlib.Location.t * exn
Sourceval error : loc:Ppxlib.Location.t -> exn -> 'a

error ~loc e raises e, wrapped in Located(loc, e).

Sourceval check : loc:Ppxlib.Location.t -> bool -> exn -> unit

check ~loc b e checks if b is true, otherwise raises e, wrapped in Located(loc, e).

Sourceval error_report : loc:Ppxlib.Location.t -> string -> 'a

error_report ~loc e is error ~loc (TypeCheckingError s).

Sourceval check_report : loc:Ppxlib.Location.t -> bool -> string -> unit

check_report ~loc b e is check ~loc b (TypeCheckingError s). *

Sourceval not_supported : loc:Ppxlib.Location.t -> string -> 'a

not_supported ~loc s raises NotSupported s, wrapped in Located(loc, e).

Sourcemodule Sstr : Set.S with type elt = string

String sets.