5
5
{-# LANGUAGE OverloadedStrings #-}
6
6
{-# LANGUAGE RecordWildCards #-}
7
7
{-# LANGUAGE ViewPatterns #-}
8
- {-# OPTIONS_GHC -fno-warn- type-defaults -Wno-unused-imports #-}
8
+ {-# OPTIONS_GHC -Wno- type-defaults #-}
9
9
10
10
{- |
11
11
A plugin inspired by the REPLoid feature of <https://github.com/jyp/dante Dante>, <https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810775744 Haddock>'s Examples and Properties and <https://hackage.haskell.org/package/doctest Doctest>.
@@ -18,13 +18,12 @@ module Ide.Plugin.Eval.CodeLens (
18
18
) where
19
19
20
20
import Control.Applicative (Alternative ((<|>) ))
21
- import Control.Arrow (second , (>>>) )
22
- import Control.Exception (bracket_ , try )
21
+ import Control.Arrow (second )
22
+ import Control.Exception (bracket_ )
23
23
import qualified Control.Exception as E
24
- import Control.Lens (_1 , _3 , ix , (%~) ,
25
- (<&>) , (^.) )
26
- import Control.Monad (guard , join ,
27
- void , when )
24
+ import Control.Lens (ix , (%~) , (^.) )
25
+ import Control.Monad (guard , void ,
26
+ when )
28
27
import Control.Monad.IO.Class (MonadIO (liftIO ))
29
28
import Control.Monad.Trans.Except (ExceptT (.. ),
30
29
runExceptT )
@@ -44,25 +43,18 @@ import Data.Typeable (Typeable)
44
43
import Development.IDE.Core.Rules (IdeState ,
45
44
runAction )
46
45
import Development.IDE.Core.RuleTypes (LinkableResult (linkableHomeMod ),
47
- NeedsCompilation (NeedsCompilation ),
48
46
TypeCheck (.. ),
49
47
tmrTypechecked )
50
- import Development.IDE.Core.Shake (shakeExtras ,
51
- useNoFile_ ,
52
- useWithStale_ ,
53
- use_ , uses_ )
48
+ import Development.IDE.Core.Shake (useNoFile_ , use_ ,
49
+ uses_ )
54
50
import Development.IDE.GHC.Compat hiding (typeKind ,
55
51
unitState )
56
- import Development.IDE.GHC.Compat.Util (GhcException ,
57
- OverridingBool (.. ),
58
- bagToList )
52
+ import Development.IDE.GHC.Compat.Util (OverridingBool (.. ))
59
53
import Development.IDE.GHC.Util (evalGhcEnv ,
60
- modifyDynFlags ,
61
- printOutputable )
54
+ modifyDynFlags )
62
55
import Development.IDE.Import.DependencyInformation (transitiveDeps ,
63
56
transitiveModuleDeps )
64
- import Development.IDE.Types.Location (toNormalizedFilePath' ,
65
- uriToFilePath' )
57
+ import Development.IDE.Types.Location (toNormalizedFilePath' )
66
58
import GHC (ClsInst ,
67
59
ExecOptions (execLineNumber , execSourceFile ),
68
60
FamInst ,
@@ -87,23 +79,19 @@ import Development.IDE.Core.RuleTypes (GetLinkable (GetL
87
79
ModSummaryResult (msrModSummary ))
88
80
import Development.IDE.Core.Shake (VFSModified (VFSUnmodified ))
89
81
import qualified Development.IDE.GHC.Compat.Core as Compat (InteractiveImport (IIModule ))
90
- import qualified Development.IDE.GHC.Compat.Core as SrcLoc (HasSrcSpan (getLoc ),
91
- unLoc )
82
+ import qualified Development.IDE.GHC.Compat.Core as SrcLoc (unLoc )
92
83
import Development.IDE.Types.HscEnvEq (HscEnvEq (hscEnv ))
93
84
import qualified GHC.LanguageExtensions.Type as LangExt (Extension (.. ))
94
85
95
- import Control.Concurrent.STM.Stats (atomically )
96
86
import Development.IDE.Core.FileStore (setSomethingModified )
97
87
import Development.IDE.Core.PluginUtils
98
- import Development.IDE.Graph (ShakeOptions (shakeExtra ))
99
88
import Development.IDE.Types.Shake (toKey )
100
89
import GHC.Types.SrcLoc (UnhelpfulSpanReason (UnhelpfulInteractive ))
101
90
import Ide.Logger (Priority (.. ),
102
91
Recorder ,
103
92
WithPriority ,
104
93
logWith )
105
94
import Ide.Plugin.Error (PluginError (PluginInternalError ),
106
- handleMaybe ,
107
95
handleMaybeM )
108
96
import Ide.Plugin.Eval.Code (Statement ,
109
97
asStatements ,
@@ -117,8 +105,7 @@ import Ide.Plugin.Eval.Config (EvalConfig (..),
117
105
import Ide.Plugin.Eval.GHC (addImport ,
118
106
addPackages ,
119
107
hasPackage ,
120
- setSessionAndInteractiveDynFlags ,
121
- showDynFlags )
108
+ setSessionAndInteractiveDynFlags )
122
109
import Ide.Plugin.Eval.Parse.Comments (commentsToSections )
123
110
import Ide.Plugin.Eval.Parse.Option (parseSetFlags )
124
111
import Ide.Plugin.Eval.Rules (queueForEvaluation ,
0 commit comments