package csexp

  1. Overview
  2. Docs
type t

Type of an input source.

module Monad : sig ... end

Monad wrapping values returned by the input source

val read_string : t -> int -> (string, string) result Monad.t

read_string source size reads exactly size bytes from source and return them as a string. Reaching the end of the input before size bytes have been read is an Error.

val read_char : t -> (char, string) result Monad.t

read_char source is read_string source 1, except the result is returned as a single character.

OCaml

Innovation. Community. Security.