Skip to content
gillian » Gillian » Utils » Gillian_result

Module Utils.Gillian_result

val with_target : string -> (unit -> 'a) -> 'a
type 'a t = ('a, Error.t) Stdlib.result
val analysis_failure :
  ?is_preprocessing:bool ->
  ?in_target:string ->
  ?loc:Utils.Location.t ->
  string ->
  ('a, Error.t) Stdlib.result
val compilation_error :
  ?additional_data:Yojson.Safe.t ->
  ?loc:Utils.Location.t ->
  string ->
  ('a, Error.t) Stdlib.result
val operation_error : string -> ('a, Error.t) Stdlib.result
val internal_error :
  ?additional_data:Yojson.Safe.t ->
  ?backtrace:string option ->
  string ->
  ('a, Error.t) Stdlib.result
val to_error_code : ('a, Error.t) Stdlib.result -> int
val try_ : (unit -> ('a, Error.t) Stdlib.result) -> ('a, Error.t) Stdlib.result
val merge :
  ?merge_ok:('c -> 'b -> 'c) ->
  ('c, Error.t) Stdlib.result ->
  ('b, Error.t) Stdlib.result ->
  ('c, Error.t) Stdlib.result

"Merges" two results by selecting the error with highest precedence. If both results are AnalysisFailures, they are properly merged. If both results are Ok, takes the result of merge_ok, which takes the first value by default

val should_continue : ('a, Error.t) Stdlib.result -> bool