Skip to content

Commit f5bc01a

Browse files
committed
clean up comment and fromMaybe
1 parent 41a3c7f commit f5bc01a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ghcide/src/Development/IDE/Main.hs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import qualified Data.HashMap.Strict as HashMap
1818
import Data.Hashable (hashed)
1919
import Data.List.Extra (intercalate, isPrefixOf,
2020
nub, nubOrd, partition)
21-
import Data.Maybe (catMaybes, fromMaybe,
22-
isJust)
21+
import Data.Maybe (catMaybes, isJust)
2322
import qualified Data.Text as T
2423
import qualified Data.Text.IO as T
2524
import Development.IDE (Action, Rules,
@@ -210,14 +209,12 @@ defaultMain Arguments{..} = do
210209

211210
-- We want to set the global DynFlags right now, so that we can use
212211
-- `unsafeGlobalDynFlags` even before the project is configured
213-
-- We do it here since haskell-lsp changes our working directory to the correct place ('rootPath')
214-
-- before calling this function
215212
_mlibdir <-
216213
setInitialDynFlags dir argsSessionLoadingOptions
217214
`catchAny` (\e -> (hPutStrLn stderr $ "setInitialDynFlags: " ++ displayException e) >> pure Nothing)
218215

219216

220-
sessionLoader <- loadSessionWithOptions argsSessionLoadingOptions $ fromMaybe dir rootPath
217+
sessionLoader <- loadSessionWithOptions argsSessionLoadingOptions dir
221218
config <- LSP.runLspT env LSP.getConfig
222219
let def_options = argsIdeOptions config sessionLoader
223220

0 commit comments

Comments
 (0)