Replies: 3 comments 2 replies
-
|
Yeah, why not I suppose. If you think our Loc type is good enough for your use cases, we can extract it into a separate package. I think you'll need to lead the effort on that though. |
Beta Was this translation helpful? Give feedback.
-
|
I guess this is solved, given |
Beta Was this translation helpful? Give feedback.
-
|
In the loc project README I had started to list similar libraries and/or modules from existing projects. I've come across a couple more since. I'll start a list here, please feel free to extend I may easily have missed others.
Also, recently I saw that the Zanuda OCaml Linter was able to output located error messages from OCaml source code including quoted text, like dune. I haven't looked what lib powers this under the hood, maybe some other, or could be compiler's lib? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am extracting here the part of this discussion ocaml/opam-repository#26604 about releasing a loc package to opam, as it relates to dune:
I am using a type to represent a range of lexing positions from a file, which I called Loc.t. It's here.
I use it as dependency to decorate AST nodes built by parsers, enabling located error messages during file processing (compilers, interpreters, linters, refactor tools, etc.).
I am considering submitting it to the opam-repository, but I have some reservations.
It is very similar to Dune's
Stdune.Locmodule (and actually usesstduneunder the hood).Perhaps it would make more sense to work on extracting the Dune one as a foundational package (such as pp, dyn, and ordering), rather than maintaining this one separately.
Would you have interest in entertaining such extraction, and make what's currently
Stdune.Loca standalone & reusable package?Beta Was this translation helpful? Give feedback.
All reactions