ide-backend 0.9.0.5 → 0.9.0.6
raw patch · 3 files changed
+17/−15 lines, 3 filesdep ~ide-backend-commonPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ide-backend-common
API changes (from Hackage documentation)
Files
- IdeSession/Cabal.hs +2/−1
- IdeSession/Query.hs +13/−12
- ide-backend.cabal +2/−2
IdeSession/Cabal.hs view
@@ -19,6 +19,7 @@ import Data.List hiding (find) import Data.Maybe (catMaybes, fromMaybe, isNothing) import Data.Monoid (Monoid(..))+import Data.Proxy import Data.Time import Data.Typeable (Typeable) import Data.Version (Version (..), parseVersion)@@ -640,7 +641,7 @@ let loadedMs = toLazyList computedLoadedModules imp m = do let mdeps =- fmap (toLazyList . StrictList.map (removeExplicitSharing+ fmap (toLazyList . StrictList.map (removeExplicitSharing Proxy computedCache)) $ StrictMap.lookup m computedPkgDeps missing = fail $ "Module '" ++ Text.unpack m ++ "' not loaded."
IdeSession/Query.hs view
@@ -52,6 +52,7 @@ import Data.Accessor ((^.), (^:), getVal) import Data.List (isInfixOf, sortBy) import Data.Maybe (listToMaybe, maybeToList)+import Data.Proxy import Data.Text (Text) import Data.Typeable (Typeable) import Data.Version (Version)@@ -216,7 +217,7 @@ -- makes a big difference. getSourceErrors :: Query [SourceError] getSourceErrors = computedQuery $ \Computed{..} ->- toLazyList $ StrictList.map (removeExplicitSharing computedCache) computedErrors+ toLazyList $ StrictList.map (removeExplicitSharing Proxy computedCache) computedErrors -- | Get the list of correctly compiled modules, as reported by the compiler getLoadedModules :: Query [ModuleName]@@ -226,14 +227,14 @@ -- | Get the mapping from filenames to modules (as computed by GHC) getFileMap :: Query (FilePath -> Maybe ModuleId) getFileMap = computedQuery $ \Computed{..} path ->- fmap (removeExplicitSharing computedCache) $+ fmap (removeExplicitSharing Proxy computedCache) $ StrictMap.lookup path computedFileMap -- | Get information about an identifier at a specific location getSpanInfo :: Query (ModuleName -> SourceSpan -> [(SourceSpan, SpanInfo)]) getSpanInfo = computedQuery $ \computed@Computed{..} mod span ->- let aux (a, b) = ( removeExplicitSharing computedCache a- , removeExplicitSharing computedCache b+ let aux (a, b) = ( removeExplicitSharing Proxy computedCache a+ , removeExplicitSharing Proxy computedCache b ) in map aux . maybeToList $ internalGetSpanInfo computed mod span @@ -266,7 +267,7 @@ mExpMap = StrictMap.lookup mod computedExpTypes in case (mSpan, mExpMap) of (Just span', Just (Private.ExpMap expMap)) ->- let aux (a, b) = ( removeExplicitSharing computedCache a+ let aux (a, b) = ( removeExplicitSharing Proxy computedCache a , b ) doms = map aux $ Private.dominators span' expMap@@ -279,7 +280,7 @@ -- This information is available even for modules with parse/type errors getImports :: Query (ModuleName -> Maybe [Import]) getImports = computedQuery $ \Computed{..} mod ->- fmap (toLazyList . StrictList.map (removeExplicitSharing computedCache)) $+ fmap (toLazyList . StrictList.map (removeExplicitSharing Proxy computedCache)) $ StrictMap.lookup mod computedImports -- | Autocompletion@@ -298,7 +299,7 @@ let name' = BSSC.pack name n = last (BSSC.split '.' name') in filter (\idInfo -> name `isInfixOf` idInfoQN idInfo)- $ concatMap (toLazyList . StrictList.map (removeExplicitSharing cache))+ $ concatMap (toLazyList . StrictList.map (removeExplicitSharing Proxy cache)) . StrictTrie.elems . StrictTrie.submap n $ StrictMap.findWithDefault StrictTrie.empty modName mapOfTries@@ -308,7 +309,7 @@ -- These are only available for modules that got compiled successfully. getPkgDeps :: Query (ModuleName -> Maybe [PackageId]) getPkgDeps = computedQuery $ \Computed{..} mod ->- fmap (toLazyList . StrictList.map (removeExplicitSharing computedCache)) $+ fmap (toLazyList . StrictList.map (removeExplicitSharing Proxy computedCache)) $ StrictMap.lookup mod computedPkgDeps -- | Use sites@@ -322,7 +323,7 @@ Private.SpanId idInfo -> return idInfo Private.SpanQQ _ -> Nothing Private.SpanInSplice idInfo -> return idInfo- return $ map (removeExplicitSharing computedCache)+ return $ map (removeExplicitSharing Proxy computedCache) . concatMap (maybeListToList . StrictMap.lookup idProp) $ StrictMap.elems computedUseSites where@@ -360,7 +361,7 @@ forM_ (StrictMap.toList computedSpanInfo) $ \(mod, idMap) -> do putStrLn $ "*** " ++ Text.unpack mod ++ " ***" forM_ (StrictIntervalMap.toList (Private.idMapToMap idMap)) $ \(i, idInfo) -> do- let idInfo' = removeExplicitSharing computedCache idInfo+ let idInfo' = removeExplicitSharing (Proxy :: Proxy SpanInfo) computedCache idInfo (StrictIntervalMap.Interval (fn, fromLine, fromCol) (_, toLine, toCol)) = i fn' = dereferenceFilePathPtr computedCache fn putStrLn $ show (fn', fromLine, fromCol, toLine, toCol) ++ ": " ++ show idInfo'@@ -373,14 +374,14 @@ forM_ (StrictTrie.toList autoMap) $ \(key, idInfos) -> forM_ (toLazyList idInfos) $ \idInfo -> do let idInfo' :: IdInfo- idInfo' = removeExplicitSharing computedCache idInfo+ idInfo' = removeExplicitSharing Proxy computedCache idInfo putStrLn $ show key ++ ": " ++ show idInfo' -- | Print file mapping to stdout (for debugging purposes only) dumpFileMap :: IdeSession -> IO () dumpFileMap session = withComputedState session $ \_ Computed{..} -> forM_ (StrictMap.toList computedFileMap) $ \(path, mod) -> do- let mod' = removeExplicitSharing computedCache mod+ let mod' = removeExplicitSharing (Proxy :: Proxy ModuleId) computedCache mod putStrLn $ path ++ ": " ++ show mod' {------------------------------------------------------------------------------
ide-backend.cabal view
@@ -1,5 +1,5 @@ name: ide-backend-version: 0.9.0.5+version: 0.9.0.6 synopsis: An IDE backend library description: See README.md for more details license: MIT@@ -47,7 +47,7 @@ time >= 1.4 && < 1.6, attoparsec >= 0.10 && < 0.13, utf8-string >= 0.3 && < 1.1,- ide-backend-common >= 0.9 && < 0.10,+ ide-backend-common >= 0.9.1 && < 0.10, template-haskell, -- our own private fork: Cabal-ide-backend >= 1.23,