Skip to content

Conversation

@akrmn
Copy link
Contributor

@akrmn akrmn commented Mar 17, 2021

Hi,

This PR is pretty much what it says on the tin :)

The reason I need this is because the codebase at work uses {-# NoImplicitPrelude #-}, together with a custom prelude that includes show :: Show a => a -> Text, which doesn't play well with the Eval plugin. Currently, we get errors like:

Request workspace/executeCommand failed.
  Message: Couldn't match type ‘Text’ with ‘[Char]’
Expected type: IO String
  Actual type: IO Text

  Code: -32603 

This is because the Print class, as defined on Ide.Plugin.Eval.Code, uses whatever show is in scope. Having a qualified Prelude in scope when Print is defined should be enough to avoid that, and I can't think of any drawbacks.

Thanks for your consideration and for all the great work on HLS so far!

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.

Thank you señor Ackermann! And best wishes

@pepeiborra pepeiborra added the merge me Label to trigger pull request merge label Mar 18, 2021
@mergify mergify bot merged commit 3f2ea7c into haskell:master Mar 18, 2021
@akrmn akrmn deleted the eval-with-no-implicit-prelude branch March 18, 2021 09:48
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.

2 participants