art-w / sherlodoc

Fuzzy type search for OCaml documentation
MIT License
73 stars 6 forks source link

Write a printer for String_automata #38

Open EmileTrotignon opened 8 months ago

EmileTrotignon commented 8 months ago

The string_automata module should have a printer, that would used in unit-tests.

The representation should be human-readable, this will make the tests useful as documenation, and a failing test will have a useful diff. An idea for such a representation would an ascii-tree like this :

|-- a
|   |-- b
|   |   `-- d     
|   `-- c 
`-- d

I am very open to other designs, provided they are readable enough.

A PR does have to include extensive tests, but minimal tests to show that the printer work are necessary.