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

Do not use Prelude; concoct our own Happy_Prelude alias (#325) #326

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

sgraf812
Copy link
Collaborator

This is in order to undo a breaking change caused by users writing import Prelude hiding (null).

Fixes #325.

@sgraf812
Copy link
Collaborator Author

cabal.project to test the candidate:

packages:
  . 
  http://hackage.haskell.org/package/happy-lib-2.1.2/candidate/happy-lib-2.1.2.tar.gz
  http://hackage.haskell.org/package/happy-2.1.2/candidate/happy-2.1.2.tar.gz

Copy link
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would HappyPrelude (CamlCase) be more in style of this codebase?

lib/backend-lalr/src/Happy/Backend/LALR.hs Outdated Show resolved Hide resolved
@andreasabel
Copy link
Member

cabal.project to test the candidate:

packages:
  . 
  http://hackage.haskell.org/package/happy-lib-2.1.2/candidate/happy-lib-2.1.2.tar.gz
  http://hackage.haskell.org/package/happy-2.1.2/candidate/happy-2.1.2.tar.gz

I tested this with building Agda-2.6.4.3, and it worked fine!

This is in order to undo a breaking change caused by users
writing `import Prelude hiding (null)`.

Fixes #325.
@sgraf812
Copy link
Collaborator Author

Would HappyPrelude (CamlCase) be more in style of this codebase?

Perhaps, yes. On the other hand, all the other qualified imports are of the form Happy_Data_Array (for example). Furthermore, there is an alias type Happy_Int = Int#, so it's not like there is a fixed convention to follow.

I think I would prefer HappyPrelude, but if we switch to that case convention, we should do it consistently throughout the generated code. Not in this patch, though, and it is not an itch that I feel much of an urge to scratch.

@sgraf812 sgraf812 merged commit 5b4caf1 into master Oct 27, 2024
26 checks passed
@sgraf812 sgraf812 deleted the wip/T325 branch October 27, 2024 14:14
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

Successfully merging this pull request may close these issues.

The qualified use of Prelude introduced in 2.1.1 breaks Agda
2 participants