coalton-lang / coalton

Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.
https://coalton-lang.github.io/
MIT License
1.12k stars 67 forks source link

Source Locations in Documentation #1216

Closed jbouwman closed 2 weeks ago

jbouwman commented 3 weeks ago

There are two major parts to this change set:

The documentation generator is substantially rewritten to provide direct links to definitions. This works in the existing hugo web documentation, and supports emacs jump-to-definition. Some outstanding issues are also fixed, for instance, sorting of indexes and entries.

For most AST nodes, the source-span typed 'source' slot is replaced with a 'location' struct that has a persistable reference to the source file, as well as a span. Renaming of slot accessors and initialization keywords accounts for the majority of line changes outside of doc generator code.

source-error conditions are changed such that the source-error structure is built in-place, rather than constructed and returned by a lambda. This is also done in order to support introspectable conditions on behalf of emacs integration.

jbouwman commented 2 weeks ago

Obtained secondary approval from @macrologist