package ppx_factory

  1. Overview
  2. Docs
PPX to derive factories and default values

Install

Dune Dependency

Authors

Maintainers

Sources

ppx_factory-0.2.0.tbz
sha256=23a90da63c9ab5078b0582805bbdaabf440cd8a8ac32abd1ad16d2dbac27b891
sha512=5d1e9f14d7cecc6617a9bc4d4438648230e05c167b7fd7f88449d94d5ab237561c0fc1f62fd628a6af0d77094c7f167d18910676e20ce3659a5383c38f2d4806

doc/src/ppx_factory._lib/loc_err.ml.html

Source file loc_err.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
type t =
  { loc : Location.t
  ; msg : string
  }

let msg t = t.msg

let as_result ~loc ~msg = Error {loc; msg}

let raise_ {loc; msg} = Raise.errorf ~loc "%s" msg

let ok_or_raise = function
  | Ok x -> x
  | Error err -> raise_ err
OCaml

Innovation. Community. Security.