A typed regular expression library for OCaml that enables type-safe parsing and unparsing with automatic group extraction.
Typed Regular Expressions
Ensures regex groups are correctly typed at compile time, preventing runtime errors, as shown in the example where 'dim' parses integers without manual type checks.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows the same expression to parse strings into data and unparse data back, useful for routing and serialization, demonstrated with Tyre.eval generating strings from tuples.
Matched groups are automatically converted to OCaml values, reducing boilerplate code, evident in Tyre.exec returning typed results like (int * int).
Built entirely in OCaml with no external dependencies beyond ocaml-re, ensuring easy integration and consistency within OCaml projects.
Adds type-checking and combinator layers that may slow regex execution compared to raw libraries like ocaml-re, as benchmarks compare it with Angstrom for HTTP parsing.
Requires learning a domain-specific language of combinators (e.g., '*>' and '<&>') instead of standard regex strings, which can be unfamiliar and increase initial development time.
Niche to OCaml with fewer community resources and tutorials compared to mainstream regex libraries, potentially making debugging and adoption harder for new users.