brendanzab / codespan

Beautiful diagnostic reporting for text-based programming languages.
Apache License 2.0
1.1k stars 59 forks source link

Add examples of working with other libraries #102

Open brendanzab opened 5 years ago

brendanzab commented 5 years ago

It would be nice to show how codespan can be used in conjunction with other libraries. Some ones we might want to show are:

Candidate libraries

Incremental Compilation

We get a number of requests (#172, #179) about Salsa, so we could do with a simple example showing how we recommend using it with codespan-reporting!

Parsers

Many people get started building languages using parser generators, so showing them how to get codespan hooked up to these would be very useful!

Pretty printing

It would be nice to have an example of pretty printing types, with source code highlighting, and potentially nifty things like type diffs.

Stupremee commented 4 years ago

I'm currently working on a project that uses codespan-reporting and salsa.

brendanzab commented 4 years ago

Oh wow, this looks like a nice thing to learn from in general!

Kixiron commented 4 years ago

I made a minimal example of using salsa & codespan-reporting to get on-demand computation (so you only calculate spans and stuff for the errors you actually emit)