Skip to content

Eval plugin ignores LANGUAGE extensions #320

Closed
@konn

Description

@konn

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-eval-plugintype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions