Skip to content

simple eval plugin should respect extension pragmas in file #369

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
codygman opened this issue Sep 1, 2020 · 2 comments
Closed

simple eval plugin should respect extension pragmas in file #369

codygman opened this issue Sep 1, 2020 · 2 comments
Labels
component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@codygman
Copy link

codygman commented Sep 1, 2020

Steps to reproduce

Tell us how to reproduce this issue.

Create a stack project and update Main.hs to:

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Data.ByteString.Lazy.Char8

myByteString :: ByteString
myByteString = "my "

-- >>> myByteString <> "stuff"

main :: IO ()
main = pure ()

Expected behaviour

OverloadedStrings should take effect in the inline code evaluation context resulting in:

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Data.ByteString.Lazy.Char8

myByteString :: ByteString
myByteString = "my "

-- >>> myByteString <> "stuff"
-- "my stuff"

main :: IO ()
main = pure ()

Actual behaviour

An error indicating the inline evaluation context doesn't respect OverloadedStrings. I've also verified it doesn't work with others like DeriveGeneric and TypeApplications.

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Data.ByteString.Lazy.Char8

myByteString :: ByteString
myByteString = "my "

-- >>> myByteString <> "stuff"
-- Couldn't match expected type ‘ByteString’ with actual type ‘[Char]’

main :: IO ()
main = pure ()
@jneira jneira added component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Sep 1, 2020
@pepeiborra
Copy link
Collaborator

Thanks for the bug report. I thought this was already fixed by #322
What version are you using?

@pepeiborra
Copy link
Collaborator

closing as this is already fixed in 0.4.0

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

3 participants