Skip to content

Commit

Permalink
clean up comment and fromMaybe
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra committed Jun 6, 2021
1 parent 41a3c7f commit f5bc01a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ghcide/src/Development/IDE/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import qualified Data.HashMap.Strict as HashMap
import Data.Hashable (hashed)
import Data.List.Extra (intercalate, isPrefixOf,
nub, nubOrd, partition)
import Data.Maybe (catMaybes, fromMaybe,
isJust)
import Data.Maybe (catMaybes, isJust)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Development.IDE (Action, Rules,
Expand Down Expand Up @@ -210,14 +209,12 @@ defaultMain Arguments{..} = do

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


sessionLoader <- loadSessionWithOptions argsSessionLoadingOptions $ fromMaybe dir rootPath
sessionLoader <- loadSessionWithOptions argsSessionLoadingOptions dir
config <- LSP.runLspT env LSP.getConfig
let def_options = argsIdeOptions config sessionLoader

Expand Down

0 comments on commit f5bc01a

Please # to comment.