packages feed

haskell-tools-daemon 1.0.1.1 → 1.1.0.0

raw patch · 14 files changed

+116/−76 lines, 14 filesdep ~basedep ~ghcdep ~haskell-tools-builtin-refactorings

Dependency ranges changed: base, ghc, haskell-tools-builtin-refactorings, haskell-tools-prettyprint, haskell-tools-refactor, template-haskell

Files

Language/Haskell/Tools/Daemon.hs view
@@ -1,4 +1,7 @@-{-# LANGUAGE FlexibleContexts, MonoLocalBinds, MultiWayIf, OverloadedStrings, RecordWildCards, ScopedTypeVariables, TypeApplications #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeApplications #-}
 
 -- | The central module for the background process of Haskell-tools. Starts the daemon process and
 -- updates it for each client request in a loop. After this releases the resources and terminates.
Language/Haskell/Tools/Daemon/ErrorHandling.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE LambdaCase, ScopedTypeVariables #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE ScopedTypeVariables #-}
 
 -- | Handlers for common errors in Haskell-tools daemon.
 module Language.Haskell.Tools.Daemon.ErrorHandling where
Language/Haskell/Tools/Daemon/GetModules.hs view
@@ -1,4 +1,9 @@-{-# LANGUAGE BangPatterns, FlexibleContexts, LambdaCase, RankNTypes, RecordPuns, TupleSections, TypeApplications #-}
+{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE NamedFieldPuns #-}
+{-# LANGUAGE TupleSections #-}
+{-# LANGUAGE TypeApplications #-}
 
 -- | Collecting modules contained in a module collection (library, executable, testsuite or
 -- benchmark). Gets names, source file locations, compilation and load flags for these modules.
@@ -16,7 +21,7 @@ import Distribution.Package (Dependency(..), PackageName(..), pkgName, unPackageName)
 import Distribution.PackageDescription
 import Distribution.PackageDescription.Configuration (finalizePD)
-import Distribution.PackageDescription.Parse (readGenericPackageDescription)
+import Distribution.PackageDescription.Parsec (readGenericPackageDescription)
 import Distribution.System (buildPlatform)
 import Distribution.Types.ComponentRequestedSpec (ComponentRequestedSpec(..))
 import Distribution.Types.UnqualComponentName (unUnqualComponentName)
@@ -28,6 +33,7 @@ import DynFlags
 import qualified DynFlags as GHC
 import GHC hiding (ModuleName)
+import CmdLineParser
 
 import Language.Haskell.Tools.Daemon.MapExtensions (translateExtension, setExtensionFlag', unSetExtensionFlag')
 import Language.Haskell.Tools.Daemon.Representation
@@ -90,7 +96,7 @@                            ++ catMaybes (map (toModuleCollection pkg) (benchmarks pkg))
 
         toModuleCollection :: ToModuleCollection tmc => PackageDescription -> tmc -> Maybe (ModuleCollection ModuleNameStr)
-        toModuleCollection PackageDescription{ buildType = Just Custom } _
+        toModuleCollection PackageDescription{ buildTypeRaw = Just Custom } _
           = throw $ UnsupportedPackage "'build-type: custom' setting in cabal file"
         toModuleCollection pkg tmc
           = let bi = getBuildInfo tmc
@@ -108,7 +114,8 @@           where modRecord mn = ( moduleName mn, ModuleNotLoaded NoCodeGen (needsToCompile tmc mn) )
         moduleName = concat . intersperse "." . components
         setupFlags = either (\deps -> error $ "Missing dependencies: " ++ show deps) fst
-                       . finalizePD [] (ComponentRequestedSpec True True) (const True) buildPlatform
+                       . finalizePD (mkFlagAssignment [])
+                                    (ComponentRequestedSpec True True) (const True) buildPlatform
                                     (unknownCompilerInfo buildCompilerId NoAbiTag) []
 
 data UnsupportedPackage = UnsupportedPackage String
@@ -222,7 +229,7 @@ loadFlagsFromBuildInfo :: BuildInfo -> DynFlags -> IO DynFlags
 loadFlagsFromBuildInfo bi@BuildInfo{ cppOptions } df
   = do (df',unused,warnings) <- parseDynamicFlags df (map (L noSrcSpan) $ cppOptions)
-       mapM_ putStrLn (map unLoc warnings ++ map (("Flag is not used: " ++) . unLoc) unused)
+       mapM_ putStrLn (map (unLoc . warnMsg) warnings ++ map (("Flag is not used: " ++) . unLoc) unused)
        return (setupLoadExtensions df')
   where setupLoadExtensions = foldl (.) id (map setExtensionFlag' $ catMaybes $ map translateExtension loadExtensions)
         loadExtensions = [PatternSynonyms | patternSynonymsNeeded] ++ [ExplicitNamespaces | explicitNamespacesNeeded]
@@ -239,7 +246,7 @@ -- the import pathes are already set globally
 flagsFromBuildInfo bi@BuildInfo{ options } df
   = do (df',unused,warnings) <- parseDynamicFlags df (map (L noSrcSpan) $ concatMap snd options)
-       mapM_ putStrLn (map unLoc warnings ++ map (("Flag is not used: " ++) . unLoc) unused)
+       mapM_ putStrLn (map (unLoc . warnMsg) warnings ++ map (("Flag is not used: " ++) . unLoc) unused)
        return $ (flip lang_set (toGhcLang =<< defaultLanguage bi))
          $ foldl (.) id (map (\case EnableExtension ext -> setEnabled True ext
                                     DisableExtension ext -> setEnabled False ext
Language/Haskell/Tools/Daemon/ModuleGraph.hs view
@@ -12,34 +12,40 @@ import GHC
 import HscTypes as GHC
 
-type NodeKey   = (ModuleName, HscSource)
+type NodeKey   = (ModuleName, IsBoot)
 type NodeMap a = Map.Map NodeKey a
-type SummaryNode = (ModSummary, Int, [Int])
+type SummaryNode = Node Int ModSummary
 
 getModFromNode :: SummaryNode -> ModSummary
-getModFromNode (ms, _, _) = ms
+getModFromNode = summaryNodeSummary
 
+summaryNodeSummary :: SummaryNode -> ModSummary
+summaryNodeSummary = node_payload
+
 -- Creates the dependency graph of modules currently loaded. Used for checking which modules need
 -- to be reloaded after a recompilation.
-moduleGraphNodes :: Bool -> [ModSummary]
-  -> (Graph SummaryNode, HscSource -> ModuleName -> Maybe SummaryNode)
-moduleGraphNodes drop_hs_boot_nodes summaries = (graphFromEdgedVerticesOrd nodes, lookup_node)
+moduleGraphNodes drop_hs_boot_nodes summaries =
+  (graphFromEdgedVerticesUniq nodes, lookup_node)
   where
     numbered_summaries = zip summaries [1..]
 
     lookup_node :: HscSource -> ModuleName -> Maybe SummaryNode
-    lookup_node hs_src mod = Map.lookup (mod, hs_src) node_map
+    lookup_node hs_src mod = Map.lookup (mod, hscSourceToIsBoot hs_src) node_map
 
     lookup_key :: HscSource -> ModuleName -> Maybe Int
     lookup_key hs_src mod = fmap summaryNodeKey (lookup_node hs_src mod)
 
     node_map :: NodeMap SummaryNode
-    node_map = Map.fromList [ ((moduleName (ms_mod s), (ms_hsc_src s)), node)
-                            | node@(s, _, _) <- nodes ]
+    node_map = Map.fromList [ ((moduleName (ms_mod s),
+                                hscSourceToIsBoot (ms_hsc_src s)), node)
+                            | node <- nodes
+                            , let s = summaryNodeSummary node ]
 
+    -- We use integers as the keys for the SCC algorithm
     nodes :: [SummaryNode]
-    nodes = [ (s, key, out_keys)
+    nodes = [ DigraphNode s key out_keys
             | (s, key) <- numbered_summaries
+             -- Drop the hi-boot ones if told to do so
             , not (isBootSummary s && drop_hs_boot_nodes)
             , let out_keys = out_edge_keys hs_boot_key (map unLoc (ms_home_srcimps s)) ++
                              out_edge_keys HsSrcFile   (map unLoc (ms_home_imps s)) ++
@@ -50,14 +56,37 @@                                     Nothing -> []
                                     Just k  -> [k]) ]
 
+    -- [boot-edges] if this is a .hs and there is an equivalent
+    -- .hs-boot, add a link from the former to the latter.  This
+    -- has the effect of detecting bogus cases where the .hs-boot
+    -- depends on the .hs, by introducing a cycle.  Additionally,
+    -- it ensures that we will always process the .hs-boot before
+    -- the .hs, and so the HomePackageTable will always have the
+    -- most up to date information.
+
+    -- Drop hs-boot nodes by using HsSrcFile as the key
     hs_boot_key | drop_hs_boot_nodes = HsSrcFile
                 | otherwise          = HsBootFile
 
     out_edge_keys :: HscSource -> [ModuleName] -> [Int]
     out_edge_keys hi_boot ms = mapMaybe (lookup_key hi_boot) ms
+        -- If we want keep_hi_boot_nodes, then we do lookup_key with
+        -- IsBoot; else NotBoot
 
+-- | 'Bool' indicating if a module is a boot module or not.  We need to treat
+-- boot modules specially when building compilation graphs, since they break
+-- cycles.  Regular source files and signature files are treated equivalently.
+data IsBoot = IsBoot | NotBoot
+    deriving (Ord, Eq, Show, Read)
+
+-- | Tests if an 'HscSource' is a boot file, primarily for constructing
+-- elements of 'BuildModule'.
+hscSourceToIsBoot :: HscSource -> IsBoot
+hscSourceToIsBoot HsBootFile = IsBoot
+hscSourceToIsBoot _ = NotBoot
+
 summaryNodeKey :: SummaryNode -> Int
-summaryNodeKey (_, k, _) = k
+summaryNodeKey = node_key
 
 ms_home_imps :: ModSummary -> [Located ModuleName]
 ms_home_imps = home_imps . ms_imps
@@ -81,7 +110,7 @@ reachedModules :: Bool -> (ModSummary -> Ghc Bool) -> Ghc [ModSummary]
 reachedModules dependent pred = do
   let op = if dependent then transposeG else id
-  allMods <- getModuleGraph
+  allMods <- mgModSummaries <$> getModuleGraph
   selected <- filterM pred allMods
   let (allModsGraph, lookup) = moduleGraphNodes False allMods
       selectedMods = catMaybes $ map (\ms -> lookup (ms_hsc_src ms) (moduleName $ ms_mod ms)) selected
Language/Haskell/Tools/Daemon/PackageDB.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE DeriveGeneric, MultiWayIf, ScopedTypeVariables #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE ScopedTypeVariables #-}
 
 -- | Setting the package database to use when compiling modules. The daemon must have one single
 -- package database that cannot be changed after a package is loaded using that package database.
Language/Haskell/Tools/Daemon/Protocol.hs view
@@ -1,15 +1,17 @@-{-# LANGUAGE DeriveAnyClass, DeriveGeneric, OverloadedStrings #-}
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DeriveGeneric #-}
 
 -- | This module declares the messages that can be sent from the client to the
 -- daemon engine and from the engine to the client.
-module Language.Haskell.Tools.Daemon.Protocol where
+module Language.Haskell.Tools.Daemon.Protocol
+  ( module Language.Haskell.Tools.Daemon.Protocol
+  , Marker(..), Severity(..)
+  ) where
 
 import Control.DeepSeq (NFData)
-import qualified Data.Aeson as A ((.=))
-import Data.Aeson hiding ((.=))
+import Data.Aeson (ToJSON, FromJSON, Value)
 import GHC.Generics (Generic)
 
-import FastString (unpackFS)
 import SrcLoc
 
 import Language.Haskell.Tools.Refactor
@@ -94,7 +96,10 @@                  , loadedModuleName :: String
                  }
     -- ^ The engine has loaded the given module.
-  | QueryResult { queryResult :: Value }
+  | QueryResult { queryName :: String
+                , queryType :: String
+                , queryResult :: Value
+                }
     -- ^ The result of querying the program representation.
   | UnusedFlags { unusedFlags :: [String] }
     -- ^ Returns the flags that are not used by the engine.
@@ -102,29 +107,7 @@     -- ^ The engine has closed the connection.
   deriving (Show, Generic)
 
-data Marker = Marker { location :: SrcSpan
-                     , severity :: Severity
-                     , message :: String
-                     } deriving (Generic, Eq)
-
-instance Show Marker where
-  show marker = show (severity marker) ++ " at " ++ shortShowSpanWithFile (location marker) ++ ": " ++ message marker
-
-data Severity = Error | Warning | Info
-  deriving (Show, Generic, Eq)
-
 instance ToJSON ResponseMsg
-instance ToJSON Marker
-instance ToJSON Severity
-
-instance ToJSON SrcSpan where
-  toJSON (RealSrcSpan sp) = object [ "file" A..= unpackFS (srcSpanFile sp)
-                                   , "startRow" A..= srcLocLine (realSrcSpanStart sp)
-                                   , "startCol" A..= srcLocCol (realSrcSpanStart sp)
-                                   , "endRow" A..= srcLocLine (realSrcSpanEnd sp)
-                                   , "endCol" A..= srcLocCol (realSrcSpanEnd sp)
-                                   ]
-  toJSON _ = Null
 
 data UndoRefactor = RemoveAdded { undoRemovePath :: FilePath }
                   | RestoreRemoved { undoRestorePath :: FilePath
Language/Haskell/Tools/Daemon/Representation.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE FlexibleContexts, RecordWildCards, TemplateHaskell #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TemplateHaskell #-}
 
 -- | Representation of the modules and packages in the daemon session.
 module Language.Haskell.Tools.Daemon.Representation where
Language/Haskell/Tools/Daemon/Session.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE FlexibleContexts, TypeApplications #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE TypeApplications #-}
 
 -- | Common operations for managing Daemon-tools sessions, for example loading whole packages or
 -- re-loading modules when they are changed. Maintains the state of the compilation with loaded
@@ -62,7 +63,7 @@                                   $ List.sort $ concatMap getExposedModules mcs')
      loadRes <- gtry (loadModules mcs alreadyLoadedFiles)
      case loadRes of
-       Right mods -> do 
+       Right mods -> do
          modify (refSessMCs & traversal & filtered (\mc -> (mc ^. mcId) `elem` map (^. mcId) modColls) & mcLoadDone .= True)
          compileModules report mods
        Left err -> return [err]
@@ -115,14 +116,14 @@             checkEvaluatedMods mods
             compileWhileOk mods
           where compileWhileOk [] = return []
-                compileWhileOk (mod:mods) 
+                compileWhileOk (mod:mods)
                   = do res <- gtry (reloadModule report mod)
                        case res of
                           Left err -> do dependents <- lift $ dependentModules (return . (ms_mod mod ==) . ms_mod)
                                          (err :) <$> compileWhileOk (filter ((`notElem` map ms_mod dependents) . ms_mod) mods)
                           Right _ -> compileWhileOk mods
-        
 
+
 -- | Loads the packages that are declared visible (by .cabal file).
 loadVisiblePackages :: DaemonSession ()
 loadVisiblePackages = do
@@ -189,7 +190,7 @@   liftIO $ writeIORef (hsc_NC env) nameCache'
   -- clear home package table and module graph
   lift $ modifySession (\s -> s { hsc_HPT = hptStay
-                                , hsc_mod_graph = filter ((`notElem` reachableMods) . ms_mod_name) (hsc_mod_graph s)
+                                , hsc_mod_graph = mkModuleGraph $ filter ((`notElem` reachableMods) . ms_mod_name) (mgModSummaries $ hsc_mod_graph s)
                                 })
 
 -- | Get all modules that can be accessed from a given set of modules. Can be used to select which
@@ -271,7 +272,7 @@     -- specify the need of code generation for later loading
     forM_ modsNeedCode (\ms -> modify $ refSessMCs .- codeGeneratedFor (keyFromMS ms) InterpretedCode)
     forM_ modsNeedAsm (\ms -> modify $ refSessMCs .- codeGeneratedFor (keyFromMS ms) GeneratedCode)
-    let interpreted = filter (\ms -> isAlreadyLoaded (keyFromMS ms) InterpretedCode mcs) 
+    let interpreted = filter (\ms -> isAlreadyLoaded (keyFromMS ms) InterpretedCode mcs)
                              modsNeedCode
         codeGenerated = filter (\ms -> isAlreadyLoaded (keyFromMS ms) GeneratedCode mcs) modsNeedAsm
     clearModules (interpreted ++ codeGenerated)
@@ -301,7 +302,7 @@        -- some flags are stored only in the module collection and are not recorded in the summary
        eval <- supportingModules (\ms -> (\flags -> getModSumOrig ms `elem` changedModulePathes && TemplateHaskell `xopt` flags)
                                            <$> liftIO (additionalFlags ms))
-       asm <- supportingModules (\ms -> (\flags -> getModSumOrig ms `elem` changedModulePathes 
+       asm <- supportingModules (\ms -> (\flags -> getModSumOrig ms `elem` changedModulePathes
                                                      && (StaticPointers `xopt` flags || UnboxedTuples `xopt` flags || UnboxedSums `xopt` flags))
                                            <$> liftIO (additionalFlags ms))
        let asmOrigs = map getModSumOrig asm
Language/Haskell/Tools/Daemon/State.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE RecordPuns, RecordWildCards, TemplateHaskell #-}
+{-# LANGUAGE NamedFieldPuns #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TemplateHaskell #-}
 
 module Language.Haskell.Tools.Daemon.State where
 
Language/Haskell/Tools/Daemon/Update.hs view
@@ -1,4 +1,9 @@-{-# LANGUAGE FlexibleContexts, LambdaCase, MonoLocalBinds, RecordWildCards, TupleSections, TypeApplications #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TupleSections #-}
+{-# LANGUAGE TypeApplications #-}
 
 -- | Resolves how the daemon should react to individual requests from the client.
 module Language.Haskell.Tools.Daemon.Update (updateClient, updateForFileChanges, initGhcSession) where
@@ -115,7 +120,7 @@     lift $ forM_ existingFiles (\fs -> removeTarget (TargetFile fs Nothing))
     lift $ deregisterDirs (mcs ^? traversal & filtered isRemoved & mcSourceDirs & traversal)
     modify' $ refSessMCs .- filter (not . isRemoved)
-    modifySession (\s -> s { hsc_mod_graph = filter ((`notElem` existingFiles) . getModSumOrig) (hsc_mod_graph s) })
+    modifySession (\s -> s { hsc_mod_graph = mkModuleGraph $ filter ((`notElem` existingFiles) . getModSumOrig) (mgModSummaries $ hsc_mod_graph s) })
     mcs <- gets (^. refSessMCs)
     when (null mcs) $ modify' (packageDB .= Nothing)
     return True
@@ -150,7 +155,7 @@        res <- lift $ performQuery queries (query:selection:args) (maybe (Left modPath) Right selectedMod) otherMods
        case res of
          Left err -> liftIO $ response $ ErrorMessage err
-         Right res -> liftIO $ response $ QueryResult res
+         Right (qType, qRes) -> liftIO $ response $ QueryResult query qType qRes
        when shutdown $ liftIO $ response Disconnected
        return (not shutdown)
 
@@ -251,7 +256,7 @@                         <$> getReachableModules (\_ -> return ()) (\ms -> ms_mod ms `elem` existingModNames)
       modify' $ refSessMCs .- filter (not . isTheAdded roots) -- remove the added package from the database
       forM_ existing $ \ms -> removeTarget (TargetFile (getModSumOrig ms) Nothing)
-      modifySession (\s -> s { hsc_mod_graph = filter (not . (`elem` existingModNames) . ms_mod) (hsc_mod_graph s) })
+      modifySession (\s -> s { hsc_mod_graph = mkModuleGraph $ filter (not . (`elem` existingModNames) . ms_mod) (mgModSummaries $ hsc_mod_graph s) })
       -- load new modules
       pkgDBok <- initializePackageDBIfNeeded roots
       if pkgDBok then do
@@ -319,7 +324,7 @@   -- remove targets deleted
   modify' $ refSessMCs & traversal & mcModules
               .- Map.filter (\m -> maybe True ((`notElem` removed) . getModSumOrig) (m ^? modRecMS))
-  modifySession (\s -> s { hsc_mod_graph = filter (\mod -> getModSumOrig mod `notElem` removed) (hsc_mod_graph s) })
+  modifySession (\s -> s { hsc_mod_graph = mkModuleGraph $ filter (\mod -> getModSumOrig mod `notElem` removed) (mgModSummaries $ hsc_mod_graph s) })
   -- reload changed modules
   -- TODO: filter those that are in reloaded packages
   reloadChangedModules (\ms -> resp (LoadedModule (getModSumOrig ms) (getModSumName ms)))
Language/Haskell/Tools/Daemon/Utils.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE FlexibleContexts, RankNTypes #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE RankNTypes #-}
 
 -- | Utility operations for the reprsentation of module collections.
 module Language.Haskell.Tools.Daemon.Utils where
Language/Haskell/Tools/Daemon/Watch.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE RecordWildCards, ScopedTypeVariables #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE ScopedTypeVariables #-}
 
 -- | Controls the file system watching in the daemon. The file system watching must run in a
 -- separate process to prevent blocking because of file operations interfering with watch.
haskell-tools-daemon.cabal view
@@ -1,5 +1,5 @@ name:                haskell-tools-daemon
-version:             1.0.1.1
+version:             1.1.0.0
 synopsis:            Background process for Haskell-tools that editors can connect to.
 description:         Background process for Haskell-tools that provides a way to use the tools on a
                      whole project. It also makes it possible to use the tools on the project in a
@@ -97,7 +97,7 @@                      , split                     >= 0.2   && < 1.0
                      , directory                 >= 1.2   && < 1.4
                      , process                   >= 1.6   && < 1.7
-                     , ghc                       >= 8.2   && < 8.3
+                     , ghc                       >= 8.4   && < 8.5
                      , ghc-paths                 >= 0.1   && < 0.2
                      , references                >= 0.3.2 && < 1.0
                      , network                   >= 2.6   && < 3.0
@@ -105,10 +105,10 @@                      , Cabal                     >= 2.0   && < 2.3
                      , pretty                    >= 1.1   && < 1.2
                      , optparse-applicative      >= 0.14  && < 0.15
-                     , template-haskell          >= 2.12  && < 2.13
-                     , haskell-tools-prettyprint >= 1.0   && < 1.1
-                     , haskell-tools-refactor    >= 1.0   && < 1.1
-                     , haskell-tools-builtin-refactorings >= 1.0   && < 1.1
+                     , template-haskell          >= 2.13  && < 2.14
+                     , haskell-tools-prettyprint >= 1.1   && < 1.2
+                     , haskell-tools-refactor    >= 1.1   && < 1.2
+                     , haskell-tools-builtin-refactorings >= 1.1   && < 1.2
                      , fswatch                   >= 0.1   && < 0.2
 
   exposed-modules:     Language.Haskell.Tools.Daemon
@@ -136,7 +136,7 @@                      , haskell-tools-daemon
                      , directory                 >= 1.2 && < 1.4
                      , filepath                  >= 1.4 && < 2.0
-                     , haskell-tools-builtin-refactorings >= 1.0 && < 1.1
+                     , haskell-tools-builtin-refactorings >= 1.1 && < 1.2
   hs-source-dirs:      exe
   main-is:             Main.hs
   default-language:    Haskell2010
@@ -146,9 +146,9 @@   ghc-options:         -with-rtsopts=-M2.5g
   hs-source-dirs:      test
   main-is:             Main.hs
-  build-depends:       base                      >= 4.10 && < 4.11
+  build-depends:       base                      >= 4.11 && < 4.12
                      , HUnit                     >= 1.5  && < 1.7
-                     , ghc                       >= 8.2  && < 8.3
+                     , ghc                       >= 8.4  && < 8.5
                      , tasty                     >= 0.11 && < 1.1
                      , tasty-hunit               >= 0.9  && < 0.11
                      , directory                 >= 1.2  && < 1.4
@@ -159,5 +159,5 @@                      , aeson                     >= 1.0  && < 1.4
                      , Glob                      >= 0.9  && < 0.10
                      , haskell-tools-daemon
-                     , haskell-tools-builtin-refactorings >= 1.0 && < 1.1
+                     , haskell-tools-builtin-refactorings >= 1.1 && < 1.2
   default-language:    Haskell2010
test/Main.hs view
@@ -1,4 +1,7 @@-{-# LANGUAGE LambdaCase, OverloadedStrings, ScopedTypeVariables, StandaloneDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving #-} 
 module Main where