Skip to content

Strange bug with "UnboxedTuples" #1813

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

Closed
nrolland opened this issue May 7, 2021 · 4 comments
Closed

Strange bug with "UnboxedTuples" #1813

nrolland opened this issue May 7, 2021 · 4 comments
Labels
component: hls-eval-plugin 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

@nrolland
Copy link

nrolland commented May 7, 2021

When this extension is enabled, I can't evaluate expressions

{-# LANGUAGE UnboxedTuples #-}

module SOQuestionRLSBug where

-- >>> show 3 -- disable "UnboxedTuples" to evaluate this expression in RLS from Visual studio
@jneira jneira transferred this issue from haskell/vscode-haskell May 8, 2021
@jneira jneira added component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels May 8, 2021
@pepeiborra
Copy link
Collaborator

This happens because GHC doesn't support UnboxedTuples in bytecode, which is what the eval plugin uses.
Could you try to use {-# OPTIONS -fobject-code #-} and report back?

@jneira jneira added the status: needs info Not actionable, because there's missing information label May 9, 2021
@July541
Copy link
Collaborator

July541 commented May 9, 2021

Adding {-# OPTIONS -fobject-code #-} seems not work.
Combining the Dynflag Opt_ByteCodeIfUnboxed with the ghcSession can prevent this bug happen. Maybe we can add an extra Opt_ByteCodeIfUnboxed flag if the module is not interpreted, but I am not sure is it a generalized solution.

@jneira
Copy link
Member

jneira commented Jun 20, 2021

@michaelpj
Copy link
Collaborator

This should work in newer GHCs, so I think we can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: hls-eval-plugin 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

No branches or pull requests

5 participants