Skip to content

Eval plugin ignores LANGUAGE extensions #320

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
konn opened this issue Aug 14, 2020 · 0 comments · Fixed by #322
Closed

Eval plugin ignores LANGUAGE extensions #320

konn opened this issue Aug 14, 2020 · 0 comments · Fixed by #322
Labels
component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@konn
Copy link
Collaborator

konn commented Aug 14, 2020

First of all, I would like to thank all the developers that make HLS possible! The HLS undoubtedly improves DX in Haskell tremendously!

By the way, it seems that Eval plugin ignores language pragmas of the given module.

Consider the following simple example:

{-# LANGUAGE DataKinds, TypeApplications #-}
module Main where
import Data.Proxy

-- >>> Proxy :: Proxy 3

-- >>> Proxy @3

main :: IO ()
main = do
  putStrLn "hello world"

Then Evaluate... code lens appears at the top of each >>> lines:

スクリーンショット 2020-08-14 13 49 26

But if we click both Evaluate...s, the HLS complains that the required language pragma(s) are not enabled, even though it is specified by LANGUAGE pragma!

-- >>> Proxy :: Proxy 3
-- Illegal type: ‘3’ Perhaps you intended to use DataKinds

-- >>> Proxy @3
-- parse error on input ‘@’

Environment

  • VSCode 1.48.0 + Haskell 1.1.0
  • GHC 8.8.3 (as required by Stackage lts-16.9)
  • HLS haskell-language-server version: 0.3.0.0 (GHC: 8.8.3)
  • macOS Catalina 10.15.6(19G73)
@lukel97 lukel97 added component: hls-eval-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Aug 14, 2020
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

Successfully merging a pull request may close this issue.

2 participants