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

Fix #723 (Instance declarations in hs-boot files result in GHC errors) #781

Merged
merged 10 commits into from
Jan 5, 2021

Conversation

simmsb
Copy link
Contributor

@simmsb simmsb commented Jan 1, 2021

Hi, I've put together a fix for #723.

The core of it is just using mkBootModDetailsTc instead of tidyProgram on boot files.

@pepeiborra
Copy link
Collaborator

how do we know that this works? Can we have a test?

@simmsb
Copy link
Contributor Author

simmsb commented Jan 2, 2021

I've updated the boot test to include an instance declaration, is this okay?

@pepeiborra
Copy link
Collaborator

I've updated the boot test to include an instance declaration, is this okay?

Did you check that the extended test fails without your fix?

@simmsb
Copy link
Contributor Author

simmsb commented Jan 2, 2021

Turns out the error only presented itself when template haskell was enabled in the module with a boot file, the test now correctly fails on master and passes with this PR.

@jneira jneira linked an issue Jan 4, 2021 that may be closed by this pull request
@jneira jneira requested a review from pepeiborra January 4, 2021 20:31
Copy link
Collaborator

@pepeiborra pepeiborra left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@pepeiborra pepeiborra added the merge me Label to trigger pull request merge label Jan 5, 2021
@mergify mergify bot merged commit 7878c0c into haskell:master Jan 5, 2021
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Jan 9, 2021
… errors) (haskell#781)

* Fix haskell#723

* Update boot test to have instance declarations

* Correct expected location of 'f' in boot-def-test

* Missed TemplateHaskell pragma from boot test

* Fix comment placement

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instance declarations in hs-boot files result in GHC errors
3 participants