RedPRL / asai

🩺 A library for compiler diagnostics
https://ocaml.org/p/asai
Apache License 2.0
35 stars 2 forks source link

refactor: factor out text handling as new modules `Text` and `Loctext` #159

Closed favonia closed 1 month ago

favonia commented 1 month ago

The current Diagnostic module bundles diagnostics and text operations together. The planned lower-level debugging interface #138 could reuse text operations but not (high-level) diagnostics. This PR factors out text operations as new modules Text and Loctext so that the debugging interface does not have to depend on the Diagnostic module.

Here are all the bindings being moved:

Old binding New binding
Diagnostic.text (type) Text.t
Diagnostic.text (function) Text.make
Diagnostic.textf Text.makef
Diagnostic.ktextf Text.kmakef
Diagnostic.loctext (type) Loctext.t
Diagnostic.loctext (function) Loctext.make
Diagnostic.loctextf Loctext.makef
Diagnostic.kloctextf Loctext.kmakef
Diagnostic.string_of_text Text.to_string