Skip to content

Commit

Permalink
ghcide: {Compile, Documentation}: m mark Map's Strict
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-Latukha committed Feb 6, 2022
1 parent 567ab4e commit 68ebfdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions ghcide/src/Development/IDE/Core/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ import Data.Bifunctor (second)
import qualified Data.ByteString as BS
import qualified Data.DList as DL
import Data.IORef
#if !MIN_VERSION_ghc(9,2,1)
import qualified Data.IntMap.Strict as IntMap
#endif
import Data.IntMap.Strict (IntMap)
import Data.List.Extra
import Data.List.Extra
import qualified Data.Map.Strict as MS
import Data.Maybe
import qualified Data.Text as T
Expand All @@ -106,7 +108,6 @@ import Data.Binary
import Data.Coerce
import Data.Functor
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Map as ML
import Data.Tuple.Extra (dupe)
import Data.Either.Extra (maybeToEither)
import Data.Unique as Unique
Expand Down Expand Up @@ -726,7 +727,7 @@ mergeEnvs env extraModSummaries extraMods envs = do
-- To work around this, we coerce to the underlying type
-- To remove this, I plan to upstream the missing Monoid instance
concatFC :: [FinderCache] -> FinderCache
concatFC = unsafeCoerce (mconcat @(ML.Map InstalledModule InstalledFindResult))
concatFC = unsafeCoerce (mconcat @(MS.Map InstalledModule InstalledFindResult))

withBootSuffix :: HscSource -> ModLocation -> ModLocation
withBootSuffix HsBootFile = addBootSuffixLocnOut
Expand Down
3 changes: 1 addition & 2 deletions ghcide/src/Development/IDE/Spans/Documentation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import Data.Bool (bool)
import Data.Either
import Data.Foldable
import Data.List.Extra
import qualified Data.Map as ML
import qualified Data.Map.Strict as MS
import Data.Maybe
import qualified Data.Set as S
Expand Down Expand Up @@ -61,7 +60,7 @@ mkDocMap env rm this_mod =
pure $ maybe mapToTyThing (extendNameEnv mapToTyThing n) kind
| otherwise = pure mapToTyThing
names = rights $ S.toList idents
idents = ML.keysSet rm
idents = MS.keysSet rm
mod = tcg_mod this_mod

lookupKind :: HscEnv -> Module -> Name -> IO (Maybe TyThing)
Expand Down

0 comments on commit 68ebfdf

Please sign in to comment.