Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal, Range/Relation types for tracking Source/Domain mappings instead of direct Source Offsets #38

Closed
jaesharp opened this issue Jun 26, 2021 · 1 comment

Comments

@jaesharp
Copy link
Member

jaesharp commented Jun 26, 2021

In the Technique parser the offset of a given token in a file is the primary means of tracking the location of any given object within Technique. While elegant, this makes defining valid Semigroup/Monoid instances quite difficult. The offset of the result in the current implementation of Monoid Step's mappend, for example, depends on the order of argument application in violation of the semigroup (<>) associativity law. Switching to a range/relation type (a Functor over an Algebraic Graph, for example) in order to map the domain object used by Technique to its relevant location in the source code would alleviate this issue at the expense of some complexity. This machinery could also be used to represent the refinement and canonicalisation of Technique domain objects and those operation's reasoning and results as those Graph folds. However, because it's such a fundamental change to the parser/internal API, I believe it's one worth having now.

@jaesharp jaesharp changed the title Proposal, Range/Relation types for tracking Source locations instead of direct Offsets Proposal, Range/Relation types for tracking Source/Domain mappings instead of direct Source Offsets Jun 26, 2021
@istathar
Copy link
Member

We'll need to tackle the equivalent question in Technique v1. It remains to be seen how we will relate the output of the parser to the originating source code.

@istathar istathar closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants