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

New scoping system #719

Open
Ericson2314 opened this issue Oct 11, 2024 · 4 comments
Open

New scoping system #719

Ericson2314 opened this issue Oct 11, 2024 · 4 comments

Comments

@Ericson2314
Copy link
Contributor

QBaseScope et al were put in place because of limitations of the Haskell type system at the time. It's likely we can get rid of this. In fact, we should probably rethink the entire scoping system in light of new GHC features, and be willing to break compatibility.

Originally posted by @tathougies in #652 (comment)

What would this look like? More data kinds? Something more radical?

@tathougies
Copy link
Collaborator

Oh gosh I'd have to really go back and think about this. I believe the main issue is that we ought to be able to keep the 'base' scope as an existential, but for whatever reason, when I first wrote beam, the compiler was unable to match existentials and allow typechecking to pass. It probably does at this point.

@Ericson2314
Copy link
Contributor Author

Thanks for remembering, @tathougies.

On a similar note, here and a few other places in beam I would have used data kinds (don't need arbitrary types in our scopes do we?). Do you have thoughts on that?

@tathougies
Copy link
Collaborator

Yeah, the scoping system could definitely be replaced with data kinds. Keep in mind Haskell looked a lot different when I first wrote beam :)

@Ericson2314
Copy link
Contributor Author

@tathougies I believe it, but I also think I don't know just how far back the prehistory of beam goes :).

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