Skip to content
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

Apply the module pragmas for evaluation #322

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Ide/Plugin/Eval.hs
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,8 @@ done, we want to switch back to GhcSessionDeps:

hscEnv' <- ExceptT $
evalGhcEnv (hscEnv session) $ do
df <- getSessionDynFlags
env <- getSession
df <- liftIO $ setupDynFlagsForGHCiLike env df
df <- liftIO $ setupDynFlagsForGHCiLike env $ ms_hspp_opts ms
_lp <- setSessionDynFlags df

-- copy the package state to the interactive DynFlags
Expand Down
1 change: 1 addition & 0 deletions test/functional/Eval.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ tests = testGroup
, testCase "Refresh an evaluation w/ lets" $ goldenTest "T6.hs"
, testCase "Refresh a multiline evaluation" $ goldenTest "T7.hs"
, testCase "Evaluate incorrect expressions" $ goldenTest "T8.hs"
, testCase "Applies file LANGUAGE extensions" $ goldenTest "T9.hs"
]

goldenTest :: FilePath -> IO ()
Expand Down
5 changes: 5 additions & 0 deletions test/testdata/eval/T9.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# LANGUAGE DataKinds #-}
module T9 where
import Data.Proxy

-- >>> Proxy :: Proxy 3
6 changes: 6 additions & 0 deletions test/testdata/eval/T9.hs.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{-# LANGUAGE DataKinds #-}
module T9 where
import Data.Proxy

-- >>> Proxy :: Proxy 3
-- Proxy