ppx_deriving_madcast

AuthorsNiols <niols@niols.fr> and Kerl <kerl@wkerl.me>
LicenseLGPL3
Homepagehttps://github.com/Niols/ppx_deriving_madcast
Issue Trackerhttps://github.com/Niols/ppx_deriving_madcast/issues
Tagsyntax
MaintainerNiols <niols@niols.fr>
Dependencies
&jbuilder
ocamlfind
ppx_deriving
ppx_tools
ppxfind
Availableocaml-version >= "4.04.0"
PublishedMay 21, 2018
Source [http] https://github.com/Niols/ppx_deriving_madcast/archive/v0.1.tar.gz
312d4fcb58029810900c50c7cb9cfe69
StatisticsNot installed in the last month.
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/ppx_deriving_madcast/ppx_deriving_madcast.0.1/opam

Library deriving cast functions based on their types.

This package provides a PPX that allows to derive cast functions based on their types. For instance, [%madcast: ('a * string) -> ('a * int)] would be replaced by:

fun (x, y) ->
  (x,
   try int_of_string y
   with Failure _ -> failwith "madcast: string -> int")
No package is dependent