Note that because the canonical representation of S-expressions is so simple, this module doesn't go out of his way to provide a fully generic parser and printer and instead just provides a few simple functions. If you are using fancy input sources, simply copy the parser and adapt it. The format is so simple that it's pretty difficult to get it wrong by accident.
To avoid a dependency on a particular S-expression library, the only module of this library is parameterised by the type of S-expressions.
let rec print = function
| Atom str -> Printf.printf "%d:%s" (String.length s)
| List l -> List.iter print l