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

Reduction stack overflow error loading ghcide code base #1743

Closed
berberman opened this issue Apr 17, 2021 · 2 comments · Fixed by #1751
Closed

Reduction stack overflow error loading ghcide code base #1743

berberman opened this issue Apr 17, 2021 · 2 comments · Fixed by #1751
Labels
old_type: meta Planing and organizing other issues status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@berberman
Copy link
Collaborator

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.1.0.0 (GHC: 8.10.4) (PATH: /home/berberman/.cabal/store/ghc-8.10.4/haskell-language-server-1.1.0.0-e-haskell-language-server-eb05d8a7d7a91e13040e70afeca109451ba08bb704fbbea7e3581a1a6a883d57/bin/haskell-language-server)
Tool versions found on the $PATH
cabal:          3.4.0.0
stack:          Not found
ghc:            8.10.4

Which OS do you use:
NixOS
Which lsp-client do you use:
VSCode
Describe your project (alternative: link to the project):
ghcide

Steps to reproduce

Open Development.IDE.GHC.ExactPrint module

Expected behaviour

The module can be loaded

Actual behaviour

Typecheck failed at line 298:

• Reduction stack overflow; size = 201
  When simplifying the following type: Outputable SrcSpan
  Use -freduction-depth=0 to disable this check
  (any upper bound you could choose might fail unpredictably with
   minor updates to GHC, so disabling the check is recommended if
   you're sure that type checking should terminate)
• In the expression: annotate dflags needs_space
  In the second argument of ‘($)’, namely
    ‘annotate dflags needs_space $ mk_parens val'’
  In a stmt of a 'do' block:
    (anns, val'') <- hoistTransform (either fail pure)
                       $ annotate dflags needs_space $ mk_parens val'

This function was added in #1721

@Ailrun Ailrun added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. component: wingman labels Apr 17, 2021
@berberman berberman added status: needs repro old_type: meta Planing and organizing other issues and removed component: wingman labels Apr 18, 2021
pepeiborra added a commit that referenced this issue Apr 18, 2021
pepeiborra added a commit that referenced this issue Apr 18, 2021
pepeiborra added a commit that referenced this issue Apr 18, 2021
@mergify mergify bot closed this as completed in #1751 Apr 19, 2021
mergify bot pushed a commit that referenced this issue Apr 19, 2021
pepeiborra added a commit to pepeiborra/ide that referenced this issue Apr 23, 2021
@jneira
Copy link
Member

jneira commented Nov 3, 2021

This error has been reported in discord with hls-1.4.0 which should have the fix afaics

It is triggered by adding a redundant class constraint and it go away removing it

It is triggered by the src/Pidgin/LearnDesugar.hs file.
at line 507
The function that seems to cause it is "fixedTrans"
It is defined in
src/DesugarSynth/Base.hs
in line 151
This function has a sole class constraint "(SortMapC srcTypes trgTypes)"
And this constaint seems to trigger the strange error.
But only in HLS, not in a stack build.

Link to the project here: https://zenodo.org/record/5475211/files/one-down-synthesis-lib.tar.gz?download=1
ghc version: 8.8.4
tool: stack

The error is not triggered with newer ghc versions (8.10.7)

@jneira jneira reopened this Nov 3, 2021
@jneira jneira changed the title Unable to load ghcide code base Reduction stack overflow error loading ghcide code base Nov 3, 2021
@hasufell hasufell added status: needs info Not actionable, because there's missing information and removed old_status: needs repro labels Jul 13, 2022
@michaelpj
Copy link
Collaborator

Closing as old and quiet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
old_type: meta Planing and organizing other issues status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants