package hxd

  1. Overview
  2. Docs
Hexdump in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

hxd-0.3.3.tbz
sha256=4ede235296a5e2a2599776c8bceb4853c164ef7e573570a1edc68a4c0c90433e
sha512=39d42632ea7acc2e9418faefdef91085e420a03c3aa03e04e75f99c9d24a4deb96ff71ad948d208ce562077dd3f6f92f975dc7c006a97cd7eabc1e8a7f5381d0

doc/src/hxd.core/s.ml.html

Source file s.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
type ('a, 's) io

type 's scheduler = {
    bind: 'a 'b. ('a, 's) io -> ('a -> ('b, 's) io) -> ('b, 's) io
  ; return: 'a. 'a -> ('a, 's) io
}

type ('f, 's, 'e) seek = {
    lseek: 'f -> int -> [ `SET | `CUR | `END ] -> ((int, 'e) result, 's) io
}

module type X = sig
  type 'a s
  type t

  external inj : 'a s -> ('a, t) io = "%identity"
  external prj : ('a, t) io -> 'a s = "%identity"
end

module Common = struct
  type t

  external inj : 'a -> 'b = "%identity"
  external prj : 'a -> 'b = "%identity"
end

module type FUNCTOR = sig
  type 'a t
end

module Make (T : FUNCTOR) = struct
  type 'a s = 'a T.t

  include Common
end

type ('f, 'b, 's, 'e) input =
  'f -> 'b -> off:int -> len:int -> ((int, 'e) result, 's) io

type ('f, 'b, 's, 'e) output =
  'f -> 'b -> off:int -> len:int -> ((int, 'e) result, 's) io
OCaml

Innovation. Community. Security.