Data structures (based on ports from Scheme) for managing text input and output on channels and strings in OCaml. Input and Output ports track the number of characters read and written respectively. Optionally, line numbers and column numbers can be tracked.