this repo has no description
1opam-version: "2.0"
2maintainer: "thomas@gazagnaire.org"
3authors: "Thomas Gazagnaire"
4homepage: "https://github.com/mirage/mirage-tc"
5bug-reports: "https://github.com/mirage/mirage-tc/issues"
6license: "ISC"
7dev-repo: "git+https://github.com/mirage/mirage-tc.git"
8build: [
9 ["./configure" "--prefix" prefix]
10 [make]
11 ["./configure" "--prefix" "--enable-tests"] {with-test}
12 [make "test"] {with-test}
13]
14install: [make "install"]
15remove: ["ocamlfind" "remove" "tc"]
16depends: [
17 "ocaml" {>= "4.01.0"}
18 "ezjsonm" {>= "0.4.0" & <"1.2.0"}
19 "mstruct" {>= "1.3.1"}
20 "cstruct"
21 "bin_prot"
22 "base-bytes"
23 "alcotest" {with-test}
24 "ounit" {with-test}
25 "ocamlbuild" {build}
26]
27synopsis: "MirageOS type-classes"
28description: """
29A set of functors and combinators to pretty-print (using sexplib), to
30convert to and from and JSON and Cstruct buffers.
31
32```ocaml
33# Tc.show (module Tc.S) "Hello world!";;
34- : string = "\\"Hello world!\\""
35# Tc.to_json (module Tc.App2(Tc.P)(Tc.I)(Tc.S)) (3, "foo");;
36- : Ezjsonm.t = `A [`String "3"; `String "foo"]
37```
38
39A slightly more complex example, using autogen code instead of functor
40composition:
41
42```ocaml
43# camlp4o;;
44# require "sexplib.syntax";;
45# require "comparelib.syntax";;
46# require "bin_prot.syntax";;
47# module M = struct
48 type t = { foo: int; bar: string list } with sexp, bin_prot, compare
49 end;;
50# module X = Tc.I0(M);;
51# let t = { foo = 3; bar = [ "hello"; "world" ] };;
52
53# Tc.to_json (module X) t;;
54- : Ezjsonm.t =
55`A
56 [`A [`String "foo"; `String "3"];
57 `A [`String "bar"; `A [`String "hello"; `String "world"]]]
58
59# Tc.write_string (module X) t;;
60- : string = "\\003\\002\\005hello\\005world"
61```"""
62flags: light-uninstall
63url {
64 src: "https://github.com/mirage/mirage-tc/archive//0.3.0.tar.gz"
65 checksum: [
66 "sha256=5165f3ca03114531dc352b1076f6e1a5fe324363d21fbcab9f71d48699fc09d2"
67 "md5=909caab4b9a99a76b3fb6c1147e1741b"
68 ]
69}