package grace

  1. Overview
  2. Docs
A fancy diagnostics library that allows your compilers to exit with grace

Install

dune-project
 Dependency

Authors

Maintainers

Sources

grace-0.3.0.tbz
sha256=6948979d6ffb5e596773baead81e9ceef36726d6956261bdd62abb2666a45bfc
sha512=db8b39cc9a77d919ab3123bb4047bb6c672c61db9fc6810951e267b2b113c4ac07266ef57188c6db0c02cb4d43d054204cd66ebc91648dbd1da1228022b0e67b

doc/src/grace.std/option.ml.html

Source file option.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
open Grace_std0
include Stdlib.Option

let sexp_of_t = Sexplib.Std.sexp_of_option
let t_of_sexp = Sexplib.Std.option_of_sexp

let get ?here t =
  try get t with
  | Invalid_argument msg as exn ->
    (match here with
     | None -> raise exn
     | Some here -> invalid_argf "%s: %s" here msg)
;;