@@ -41,17 +41,10 @@ import Data.String (IsString (fromString))
4141import Data.Text (Text )
4242import qualified Data.Text as T
4343import Data.Time (getCurrentTime )
44- import Development.IDE.Core.Rules (runAction )
45- import Development.IDE.Core.RuleTypes (GetModSummary (.. ),
46- GhcSession (.. ))
47- import Development.IDE.Core.Shake (use_ )
48- import Development.IDE.GHC.Util (evalGhcEnv , hscEnv ,
49- textToStringBuffer )
50- import Development.IDE.Types.Location (toNormalizedFilePath' ,
51- uriToFilePath' )
44+ import Development.IDE
5245import DynamicLoading (initializePlugins )
5346import DynFlags (targetPlatform )
54- import GHC (Ghc , TcRnExprMode (.. ), DynFlags , ExecResult (.. ), GeneralFlag (Opt_IgnoreHpcChanges , Opt_IgnoreOptimChanges , Opt_ImplicitImportQualified ),
47+ import Development.IDE. GHC.Compat (Ghc , TcRnExprMode (.. ), DynFlags , ExecResult (.. ), GeneralFlag (Opt_IgnoreHpcChanges , Opt_IgnoreOptimChanges , Opt_ImplicitImportQualified ),
5548 GhcLink (LinkInMemory ),
5649 GhcMode (CompManager ),
5750 HscTarget (HscInterpreted ),
@@ -316,15 +309,15 @@ evalGhciLikeCmd cmd arg = do
316309 (ty, kind) <- typeKind True $ T. unpack input
317310 pure
318311 $ Just
319- $ T. unlines
312+ $ T. unlines
320313 $ map (" -- " <> )
321314 [ input <> " :: " <> tppr kind
322315 , " = " <> tppr ty
323- ]
316+ ]
324317 " type" -> do
325318 let (emod, expr) = parseExprMode arg
326319 ty <- exprType emod $ T. unpack expr
327- pure $ Just $
320+ pure $ Just $
328321 " -- " <> expr <> " :: " <> tppr ty <> " \n "
329322 _ -> E. throw $ GhciLikeCmdNotImplemented cmd arg
330323
@@ -346,7 +339,7 @@ instance Show GhciLikeCmdException where
346339 showsPrec _ GhciLikeCmdNotImplemented {.. } =
347340 showString " unknown command '" .
348341 showString (T. unpack ghciCmdName) . showChar ' \' '
349-
342+
350343instance E. Exception GhciLikeCmdException
351344
352345parseGhciLikeCmd :: Text -> Maybe (Text , Text )
0 commit comments