# How does one print any type?

**URL:** <https://discuss.ocaml.org/t/how-does-one-print-any-type/4362>\
**Category:** Learning\
**Created:** [September 12, 2019, 6:27pm UTC](https://discuss.ocaml.org/t/how-does-one-print-any-type/4362 "2019-09-12T18:27:55Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![rwmjones](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/rwmjones/32/818_2.png) [@rwmjones](https://discuss.ocaml.org/u/rwmjones)\
**Post date:** [September 24, 2019, 12:52pm UTC](https://discuss.ocaml.org/t/how-does-one-print-any-type/4362/9 "2019-09-24T12:52:58Z")

</div>

One way to do this is to iterate over the runtime structure. You can get quite good information out of this, although it’s not a complete view of the compile time types by any means. I wrote a utility to do this called Dumper: [https://web.archive.org/web/20101101234304/http://merjis.com/developers/dumper](https://web.archive.org/web/20101101234304/http://merjis.com/developers/dumper)

It’s pure OCaml and doesn’t require any libraries, weird syntax, modifications to your source code or anything like that.

---

_[View the full topic](https://discuss.ocaml.org/t/how-does-one-print-any-type/4362)._
