package ppx_deriving_madcast

  1. Overview
  2. Docs
Library deriving cast functions based on their types.

Install

Dune Dependency

Authors

Maintainers

Sources

v0.1.tar.gz
sha256=520e423e92e776610dba2a3d6e24bc6a5f975930251d45ae8780dd86641051f2
md5=312d4fcb58029810900c50c7cb9cfe69

Description

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")

Tags

syntax

Published: 21 May 2018

Dependencies (5)

  1. jbuilder >= "1.0+beta7"
  2. ppxfind build
  3. ppx_tools
  4. ppx_deriving < "5.0"
  5. ocaml >= "4.04.0"

Dev Dependencies (1)

  1. ocamlfind with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.