Skip to content

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

Merged
mergify[bot] merged 10 commits into
haskell:masterfrom
simmsb:fix-723
Jan 5, 2021
Merged

Fix #723 (Instance declarations in hs-boot files result in GHC errors)#781
mergify[bot] merged 10 commits into
haskell:masterfrom
simmsb:fix-723

Conversation

@simmsb

@simmsb simmsb commented Jan 1, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

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

@simmsb

simmsb commented Jan 2, 2021

Copy link
Copy Markdown
Contributor Author

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

@pepeiborra

Copy link
Copy Markdown
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

simmsb commented Jan 2, 2021

Copy link
Copy Markdown
Contributor Author

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

@pepeiborra pepeiborra left a comment

Copy link
Copy Markdown
Collaborator

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