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

Use fresh lists to enforce uniqueness of lexer keywords ? #30

Open
clayrat opened this issue Sep 5, 2019 · 2 comments
Open

Use fresh lists to enforce uniqueness of lexer keywords ? #30

clayrat opened this issue Sep 5, 2019 · 2 comments

Comments

@clayrat
Copy link
Collaborator

clayrat commented Sep 5, 2019

Fresh list is data structure defined by induction recursion for element types with a decidable equality.

Here's a PR to the Agda standard library with an implementation of fresh lists together with documentation & an updated version of the lexer example using fresh lists: agda/agda-stdlib#878

@gallais
Copy link
Owner

gallais commented Sep 5, 2019

Note that it is crucial here to implement the generalised version of fresh lists
that I have PR'd to the stdlib because we want to avoid duplicates not of pairs
of string and token but of strings. So equality is not the freshness relation
we are using here.

@clayrat
Copy link
Collaborator Author

clayrat commented Nov 1, 2021

There's an Idris implementation of fresh lists at https://github.com/ohad/collie/tree/main/src/Data/List

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants