-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell development library -- -- Haskell development library and tool with support of autocompletion, -- symbol info, go to declaration, find references, hayoo search etc. @package hsdev @version 0.2.5.1 module System.Directory.Watcher -- | Event type data EventType Added :: EventType Modified :: EventType Removed :: EventType -- | Event data Event Event :: EventType -> FilePath -> POSIXTime -> Event [_eventType] :: Event -> EventType [_eventPath] :: Event -> FilePath [_eventTime] :: Event -> POSIXTime eventType :: Lens' Event EventType eventPath :: Lens' Event FilePath eventTime :: Lens' Event POSIXTime -- | Directories watcher data Watcher a Watcher :: MVar (Map FilePath (Bool, IO ())) -> WatchManager -> Chan (a, Event) -> Watcher a -- | Map from directory to watch stopper [watcherDirs] :: Watcher a -> MVar (Map FilePath (Bool, IO ())) [watcherMan] :: Watcher a -> WatchManager [watcherChan] :: Watcher a -> Chan (a, Event) -- | Create watcher withWatcher :: (Watcher a -> IO b) -> IO b -- | Watch directory watchDir :: Watcher a -> FilePath -> (Event -> Bool) -> a -> IO () watchDir_ :: Watcher () -> FilePath -> (Event -> Bool) -> IO () -- | Unwatch directory, return False, if not watched unwatchDir :: Watcher a -> FilePath -> IO Bool -- | Check if we are watching dir isWatchingDir :: Watcher a -> FilePath -> IO Bool -- | Watch directory tree watchTree :: Watcher a -> FilePath -> (Event -> Bool) -> a -> IO () watchTree_ :: Watcher () -> FilePath -> (Event -> Bool) -> IO () -- | Unwatch directory tree unwatchTree :: Watcher a -> FilePath -> IO Bool -- | Check if we are watching tree isWatchingTree :: Watcher a -> FilePath -> IO Bool -- | Read next event readEvent :: Watcher a -> IO (a, Event) -- | Get lazy list of events events :: Watcher a -> IO [(a, Event)] -- | Process all events onEvent :: Watcher a -> (a -> Event -> IO ()) -> IO () instance GHC.Show.Show System.Directory.Watcher.EventType instance GHC.Read.Read System.Directory.Watcher.EventType instance GHC.Enum.Bounded System.Directory.Watcher.EventType instance GHC.Enum.Enum System.Directory.Watcher.EventType instance GHC.Classes.Ord System.Directory.Watcher.EventType instance GHC.Classes.Eq System.Directory.Watcher.EventType module System.Directory.Paths -- | Something with paths inside class Paths a paths :: Paths a => Traversal' a FilePath -- | Canonicalize all paths canonicalize :: Paths a => a -> IO a -- | Absolutise paths absolutise :: Paths a => FilePath -> a -> a -- | Relativise paths relativise :: Paths a => FilePath -> a -> a instance System.Directory.Paths.Paths GHC.IO.FilePath module HsDev.Version cabalVersion :: ExpQ module HsDev.Util -- | Run action with current directory set withCurrentDirectory :: (MonadIO m, MonadMask m) => FilePath -> m a -> m a -- | Get directory contents safely: no fail, ignoring symbolic links, also -- prepends paths with dir name directoryContents :: FilePath -> IO [FilePath] -- | Collect all file names in directory recursively traverseDirectory :: FilePath -> IO [FilePath] -- | Search something up searchPath :: (MonadIO m, MonadPlus m) => FilePath -> (FilePath -> m a) -> m a -- | Is one path parent of another isParent :: FilePath -> FilePath -> Bool -- | Is haskell source? haskellSource :: FilePath -> Bool -- | Is cabal file? cabalFile :: FilePath -> Bool -- | Add N tabs to line tab :: Int -> String -> String -- | Add N tabs to multiline tabs :: Int -> String -> String -- | Trim string trim :: String -> String -- | Split list split :: (a -> Bool) -> [a] -> [[a]] -- | nub is quadratic, https://github.com/nh2/haskell-ordnub/#ordnub ordNub :: Ord a => [a] -> [a] uniqueBy :: Ord b => (a -> b) -> [a] -> [a] mapBy :: Ord b => (a -> b) -> [a] -> Map b a -- | Workaround, sometimes we get HM.lookup "foo" v == Nothing, but lookup -- "foo" (HM.toList v) == Just smth (.::) :: FromJSON a => HashMap Text Value -> Text -> Parser a -- | Returns Nothing when key doesn't exist or value is -- Null (.::?) :: FromJSON a => HashMap Text Value -> Text -> Parser (Maybe a) -- | Same as .::? for list, returns empty list for non-existant -- key or Null value (.::?!) :: FromJSON a => HashMap Text Value -> Text -> Parser [a] -- | Union two JSON objects objectUnion :: Value -> Value -> Value -- | Union two JSON objects jsonUnion :: (ToJSON a, ToJSON b) => a -> b -> Value -- | No Nulls in JSON object noNulls :: [Pair] -> [Pair] -- | Lift IO exception to ExceptT liftException :: MonadCatch m => m a -> ExceptT String m a -- | Same as liftException liftE :: MonadCatch m => m a -> ExceptT String m a -- | liftE for IO liftEIO :: (MonadCatch m, MonadIO m) => IO a -> ExceptT String m a -- | Run actions ignoring errors tries :: MonadPlus m => [m a] -> m [a] triesMap :: MonadPlus m => (a -> m b) -> [a] -> m [b] -- | Lift IO exception to MonadError liftExceptionM :: (MonadCatch m, MonadError String m) => m a -> m a -- | Lift IO exceptions to ExceptT liftIOErrors :: MonadCatch m => ExceptT String m a -> ExceptT String m a eitherT :: MonadError String m => Either String a -> m a -- | Throw error as exception liftThrow :: (Show e, MonadError e m, MonadCatch m) => m a -> m a fromUtf8 :: ByteString -> String toUtf8 :: String -> ByteString -- | Read file in UTF8 readFileUtf8 :: FilePath -> IO String writeFileUtf8 :: FilePath -> String -> IO () hGetLineBS :: Handle -> IO ByteString logException :: String -> (String -> IO ()) -> IO () -> IO () logIO :: MonadCatch m => String -> (String -> m ()) -> m () -> m () ignoreIO :: MonadCatch m => m () -> m () logAsync :: (MonadIO m, MonadCatch m) => (String -> m ()) -> m () -> m () liftAsync :: (MonadThrow m, MonadCatch m, MonadIO m) => IO (Async a) -> ExceptT String m a class FromCmd a cmdP :: FromCmd a => Parser a cmdJson :: String -> [Pair] -> Value withCmd :: String -> (Object -> Parser a) -> Value -> Parser a guardCmd :: String -> Object -> Parser () -- | Add help command to parser withHelp :: Parser a -> Parser a -- | Subcommand cmd :: String -> String -> Parser a -> Mod CommandFields a -- | Parse arguments or return help parseArgs :: String -> ParserInfo a -> [String] -> Either String a -- | Get hsdev version as list of integers version :: Maybe [Int] -- | Cut version to contain only significant numbers (currently 3) cutVersion :: Maybe [Int] -> Maybe [Int] -- | Check if version is the same sameVersion :: Maybe [Int] -> Maybe [Int] -> Bool -- | Version to string strVersion :: Maybe [Int] -> String -- | Monads in which IO computations may be embedded. Any monad -- built by applying a sequence of monad transformers to the IO -- monad will be an instance of this class. -- -- Instances should satisfy the following laws, which state that -- liftIO is a transformer of monads: -- -- class Monad m => MonadIO (m :: * -> *) -- | Lift a computation from the IO monad. liftIO :: MonadIO m => IO a -> m a module HsDev.Tools.Ghc.Prelude -- | Reduce list to one element reduce :: ([a] -> a) -> [a] -> [a] -- | Make list from single element one :: a -> [a] -- | Trim string trim :: String -> String -- | Match regex rx :: String -> String -> Maybe String -- | Replace regex srx :: String -> String -> String -> String -- | Split by regex splitRx :: String -> String -> [String] lowerCase :: String -> String upperCase :: String -> String -- | Convert to title case titleCase :: String -> String -- | Convert to camel case camelCase :: String -> String -- | Convert to underscore case underscoreCase :: String -> String module HsDev.Tools.Ghc.MGhc data SessionState s SessionState :: Maybe s -> Map s HscEnv -> SessionState s [_sessionActive] :: SessionState s -> Maybe s [_sessionMap] :: SessionState s -> Map s HscEnv sessionActive :: Lens' (SessionState s) (Maybe s) sessionMap :: Lens' (SessionState s) (Map s HscEnv) -- | Multi-session ghc monad newtype MGhcT s m a MGhcT :: GhcT (ReaderT (Maybe FilePath) (StateT (SessionState s) m)) a -> MGhcT s m a [unMGhcT] :: MGhcT s m a -> GhcT (ReaderT (Maybe FilePath) (StateT (SessionState s) m)) a -- | Run multi-session ghc runMGhcT :: (MonadIO m, ExceptionMonad m, Ord s) => Maybe FilePath -> MGhcT s m a -> m a -- | Lift Ghc monad onto MGhc liftGhc :: MonadIO m => Ghc a -> MGhcT s m a -- | Does session exist hasSession :: (MonadIO m, Ord s) => s -> MGhcT s m Bool -- | Find session findSession :: (MonadIO m, Ord s) => s -> MGhcT s m (Maybe s) -- | Find session by findSessionBy :: MonadIO m => (s -> Bool) -> MGhcT s m [s] -- | Save current session saveSession :: (MonadIO m, ExceptionMonad m, Ord s) => MGhcT s m (Maybe s) -- | Initialize new session initSession :: (MonadIO m, ExceptionMonad m, Ord s) => MGhcT s m () -- | Create new named session, deleting existing session newSession :: (MonadIO m, ExceptionMonad m, Ord s) => s -> MGhcT s m () -- | Switch to session, creating if not exist, returns True if session was -- created switchSession :: (MonadIO m, ExceptionMonad m, Ord s) => s -> MGhcT s m Bool -- | Switch to session, creating if not exist and initializing with passed -- function switchSession_ :: (MonadIO m, ExceptionMonad m, Ord s) => s -> Maybe (MGhcT s m ()) -> MGhcT s m () -- | Delete existing session deleteSession :: (MonadIO m, ExceptionMonad m, Ord s) => s -> MGhcT s m () -- | Save and restore session restoreSession :: (MonadIO m, MonadMask m, ExceptionMonad m, Ord s) => MGhcT s m a -> MGhcT s m a -- | Run action using session, restoring session back usingSession :: (MonadIO m, MonadMask m, ExceptionMonad m, Ord s) => s -> MGhcT s m a -> MGhcT s m a instance System.Log.Simple.Monad.MonadLog m => System.Log.Simple.Monad.MonadLog (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader (GHC.Base.Maybe GHC.IO.FilePath) (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState (HsDev.Tools.Ghc.MGhc.SessionState s) (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance Exception.ExceptionMonad m => GhcMonad.GhcMonad (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance Control.Monad.IO.Class.MonadIO m => DynFlags.HasDynFlags (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance GHC.Base.Monad m => GHC.Base.Monad (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance GHC.Base.Monad m => GHC.Base.Applicative (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance GHC.Base.Functor m => GHC.Base.Functor (HsDev.Tools.Ghc.MGhc.MGhcT s m) instance Data.Default.Class.Default (HsDev.Tools.Ghc.MGhc.SessionState s) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (Control.Monad.Trans.State.Lazy.StateT s m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (Control.Monad.Trans.Reader.ReaderT r m) instance Control.Monad.Trans.Class.MonadTrans GhcMonad.GhcT instance Control.Monad.Morph.MFunctor GhcMonad.GhcT instance Control.Monad.State.Class.MonadState st m => Control.Monad.State.Class.MonadState st (GhcMonad.GhcT m) instance Control.Monad.Reader.Class.MonadReader r m => Control.Monad.Reader.Class.MonadReader r (GhcMonad.GhcT m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (GhcMonad.GhcT m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (GhcMonad.GhcT m) instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (GhcMonad.GhcT m) module HsDev.Tools.Ghc.Compat pkgDatabase :: DynFlags -> Maybe [PackageConfig] type UnitId = UnitId type InstalledUnitId = UnitId toInstalledUnitId :: UnitId -> InstalledUnitId unitId :: PackageConfig -> InstalledUnitId moduleUnitId :: Module -> UnitId depends :: DynFlags -> PackageConfig -> [InstalledUnitId] getPackageDetails :: DynFlags -> InstalledUnitId -> PackageConfig patSynType :: PatSyn -> Type cleanupHandler :: DynFlags -> m a -> m a renderStyle :: Mode -> Int -> Doc -> String type LogAction = DynFlags -> Severity -> SrcSpan -> MsgDoc -> IO () setLogAction :: LogAction -> DynFlags -> DynFlags languages :: [String] flags :: [String] unqualStyle :: DynFlags -> PprStyle exposedModuleName :: ExposedModule unit mname -> mname module HsDev.Tools.ClearImports -- | Dump minimal imports dumpMinimalImports :: [String] -> FilePath -> ExceptT String IO String -- | Read imports from file waitImports :: FilePath -> IO [String] -- | Clean temporary files cleanTmpImports :: FilePath -> IO () -- | Dump and read imports findMinimalImports :: [String] -> FilePath -> ExceptT String IO [String] -- | Groups several lines related to one import by indents groupImports :: [String] -> [[String]] -- | Split import to import and import-list splitImport :: [String] -> (String, String) -- | Returns minimal imports for file specified clearImports :: [String] -> FilePath -> ExceptT String IO [(String, String)] module HsDev.Project.Types -- | Cabal project data Project Project :: String -> FilePath -> FilePath -> Maybe ProjectDescription -> Project [_projectName] :: Project -> String [_projectPath] :: Project -> FilePath [_projectCabal] :: Project -> FilePath [_projectDescription] :: Project -> Maybe ProjectDescription projectName :: Lens' Project String projectPath :: Lens' Project FilePath projectCabal :: Lens' Project FilePath projectDescription :: Lens' Project (Maybe ProjectDescription) -- | Make project by .cabal file project :: FilePath -> Project -- | Make paths absolute, not relative absolutiseProjectPaths :: Project -> Project -- | Make paths relative relativiseProjectPaths :: Project -> Project data ProjectDescription ProjectDescription :: String -> Maybe Library -> [Executable] -> [Test] -> ProjectDescription [_projectVersion] :: ProjectDescription -> String [_projectLibrary] :: ProjectDescription -> Maybe Library [_projectExecutables] :: ProjectDescription -> [Executable] [_projectTests] :: ProjectDescription -> [Test] projectVersion :: Lens' ProjectDescription String projectLibrary :: Lens' ProjectDescription (Maybe Library) projectExecutables :: Lens' ProjectDescription [Executable] projectTests :: Lens' ProjectDescription [Test] class Target a buildInfo :: Target a => a -> Info -- | Library in project data Library Library :: [[String]] -> Info -> Library [_libraryModules] :: Library -> [[String]] [_libraryBuildInfo] :: Library -> Info libraryModules :: Lens' Library [[String]] libraryBuildInfo :: Lens' Library Info -- | Executable data Executable Executable :: String -> FilePath -> Info -> Executable [_executableName] :: Executable -> String [_executablePath] :: Executable -> FilePath [_executableBuildInfo] :: Executable -> Info executableName :: Lens' Executable String executablePath :: Lens' Executable FilePath executableBuildInfo :: Lens' Executable Info -- | Test data Test Test :: String -> Bool -> Info -> Test [_testName] :: Test -> String [_testEnabled] :: Test -> Bool [_testBuildInfo] :: Test -> Info testName :: Lens' Test String testEnabled :: Lens' Test Bool testBuildInfo :: Lens' Test Info -- | Build info data Info Info :: [String] -> Maybe Language -> [Extension] -> [String] -> [FilePath] -> Info [_infoDepends] :: Info -> [String] [_infoLanguage] :: Info -> Maybe Language [_infoExtensions] :: Info -> [Extension] [_infoGHCOptions] :: Info -> [String] [_infoSourceDirs] :: Info -> [FilePath] infoDepends :: Lens' Info [String] infoLanguage :: Lens' Info (Maybe Language) infoExtensions :: Lens' Info [Extension] infoGHCOptions :: Lens' Info [String] infoSourceDirs :: Lens' Info [FilePath] -- | Entity with project extensions data Extensions a Extensions :: [Extension] -> [String] -> a -> Extensions a [_extensions] :: Extensions a -> [Extension] [_ghcOptions] :: Extensions a -> [String] [_entity] :: Extensions a -> a extensions :: forall a_a14TT. Lens' (Extensions a_a14TT) [Extension] ghcOptions :: forall a_a14TT. Lens' (Extensions a_a14TT) [String] entity :: forall a_a14TT a_a16Va. Lens (Extensions a_a14TT) (Extensions a_a16Va) a_a14TT a_a16Va instance GHC.Show.Show a => GHC.Show.Show (HsDev.Project.Types.Extensions a) instance GHC.Read.Read a => GHC.Read.Read (HsDev.Project.Types.Extensions a) instance GHC.Classes.Eq a => GHC.Classes.Eq (HsDev.Project.Types.Extensions a) instance GHC.Read.Read HsDev.Project.Types.Project instance GHC.Read.Read HsDev.Project.Types.ProjectDescription instance GHC.Classes.Eq HsDev.Project.Types.ProjectDescription instance GHC.Read.Read HsDev.Project.Types.Library instance GHC.Classes.Eq HsDev.Project.Types.Library instance GHC.Read.Read HsDev.Project.Types.Executable instance GHC.Classes.Eq HsDev.Project.Types.Executable instance GHC.Read.Read HsDev.Project.Types.Test instance GHC.Classes.Eq HsDev.Project.Types.Test instance GHC.Read.Read HsDev.Project.Types.Info instance GHC.Classes.Eq HsDev.Project.Types.Info instance Control.DeepSeq.NFData HsDev.Project.Types.Project instance GHC.Classes.Eq HsDev.Project.Types.Project instance GHC.Classes.Ord HsDev.Project.Types.Project instance GHC.Show.Show HsDev.Project.Types.Project instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Project.Types.Project instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Project.Types.Project instance System.Directory.Paths.Paths HsDev.Project.Types.Project instance GHC.Show.Show HsDev.Project.Types.ProjectDescription instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Project.Types.ProjectDescription instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Project.Types.ProjectDescription instance System.Directory.Paths.Paths HsDev.Project.Types.ProjectDescription instance HsDev.Project.Types.Target HsDev.Project.Types.Library instance GHC.Show.Show HsDev.Project.Types.Library instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Project.Types.Library instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Project.Types.Library instance System.Directory.Paths.Paths HsDev.Project.Types.Library instance HsDev.Project.Types.Target HsDev.Project.Types.Executable instance GHC.Show.Show HsDev.Project.Types.Executable instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Project.Types.Executable instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Project.Types.Executable instance System.Directory.Paths.Paths HsDev.Project.Types.Executable instance HsDev.Project.Types.Target HsDev.Project.Types.Test instance GHC.Show.Show HsDev.Project.Types.Test instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Project.Types.Test instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Project.Types.Test instance System.Directory.Paths.Paths HsDev.Project.Types.Test instance GHC.Base.Monoid HsDev.Project.Types.Info instance GHC.Classes.Ord HsDev.Project.Types.Info instance GHC.Show.Show HsDev.Project.Types.Info instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Project.Types.Info instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Project.Types.Info instance System.Directory.Paths.Paths HsDev.Project.Types.Info instance GHC.Classes.Ord a => GHC.Classes.Ord (HsDev.Project.Types.Extensions a) instance GHC.Base.Functor HsDev.Project.Types.Extensions instance GHC.Base.Applicative HsDev.Project.Types.Extensions instance Data.Foldable.Foldable HsDev.Project.Types.Extensions instance Data.Traversable.Traversable HsDev.Project.Types.Extensions module HsDev.Project.Compat showVer :: Version -> String componentName :: String -> String testSuiteEnabled :: TestSuite -> Bool flattenCondTree :: Monoid a => (c -> a -> a) -> CondTree v c a -> a parsePackageDesc :: String -> ParseResult GenericPackageDescription module HsDev.PackageDb data PackageDb GlobalDb :: PackageDb UserDb :: PackageDb PackageDb :: FilePath -> PackageDb [_packageDb] :: PackageDb -> FilePath packageDb :: Traversal' PackageDb FilePath -- | Stack of PackageDb in reverse order newtype PackageDbStack PackageDbStack :: [PackageDb] -> PackageDbStack [_packageDbStack] :: PackageDbStack -> [PackageDb] packageDbStack :: Iso' PackageDbStack [PackageDb] -- | Global db stack globalDb :: PackageDbStack -- | User db stack userDb :: PackageDbStack -- | Make package-db from one package-db fromPackageDb :: FilePath -> PackageDbStack -- | Make package-db stack from paths fromPackageDbs :: [FilePath] -> PackageDbStack -- | Get top package-db for package-db stack topPackageDb :: PackageDbStack -> PackageDb -- | Get list of package-db in stack, adds additional global-db at bottom packageDbs :: PackageDbStack -> [PackageDb] -- | Get stacks for each package-db in stack packageDbStacks :: PackageDbStack -> [PackageDbStack] -- | Is one package-db stack substack of another isSubStack :: PackageDbStack -> PackageDbStack -> Bool -- | Get ghc options for package-db packageDbOpt :: PackageDb -> String -- | Get ghc options for package-db stack packageDbStackOpts :: PackageDbStack -> [String] instance Control.DeepSeq.NFData HsDev.PackageDb.PackageDbStack instance Data.Aeson.Types.ToJSON.ToJSON HsDev.PackageDb.PackageDbStack instance Data.Aeson.Types.FromJSON.FromJSON HsDev.PackageDb.PackageDbStack instance System.Directory.Paths.Paths HsDev.PackageDb.PackageDbStack instance GHC.Show.Show HsDev.PackageDb.PackageDbStack instance GHC.Read.Read HsDev.PackageDb.PackageDbStack instance GHC.Classes.Ord HsDev.PackageDb.PackageDbStack instance GHC.Classes.Eq HsDev.PackageDb.PackageDbStack instance Control.DeepSeq.NFData HsDev.PackageDb.PackageDb instance Data.Aeson.Types.ToJSON.ToJSON HsDev.PackageDb.PackageDb instance Data.Aeson.Types.FromJSON.FromJSON HsDev.PackageDb.PackageDb instance System.Directory.Paths.Paths HsDev.PackageDb.PackageDb instance GHC.Show.Show HsDev.PackageDb.PackageDb instance GHC.Read.Read HsDev.PackageDb.PackageDb instance GHC.Classes.Ord HsDev.PackageDb.PackageDb instance GHC.Classes.Eq HsDev.PackageDb.PackageDb module HsDev.Symbols.Location -- | Just package name and version without its location data ModulePackage ModulePackage :: String -> String -> ModulePackage [_packageName] :: ModulePackage -> String [_packageVersion] :: ModulePackage -> String data PackageConfig PackageConfig :: ModulePackage -> [Text] -> Bool -> PackageConfig [_package] :: PackageConfig -> ModulePackage [_packageModules] :: PackageConfig -> [Text] [_packageExposed] :: PackageConfig -> Bool -- | Location of module data ModuleLocation FileModule :: FilePath -> Maybe Project -> ModuleLocation [_moduleFile] :: ModuleLocation -> FilePath [_moduleProject] :: ModuleLocation -> Maybe Project InstalledModule :: PackageDb -> Maybe ModulePackage -> String -> ModuleLocation [_modulePackageDb] :: ModuleLocation -> PackageDb [_modulePackage] :: ModuleLocation -> Maybe ModulePackage [_cabalModuleName] :: ModuleLocation -> String ModuleSource :: Maybe String -> ModuleLocation [_moduleSourceName] :: ModuleLocation -> Maybe String moduleStandalone :: ModuleLocation -> Bool locationId :: ModuleLocation -> String noLocation :: ModuleLocation data Position Position :: Int -> Int -> Position [_positionLine] :: Position -> Int [_positionColumn] :: Position -> Int data Region Region :: Position -> Position -> Region [_regionFrom] :: Region -> Position [_regionTo] :: Region -> Position region :: Position -> Position -> Region regionAt :: Position -> Region regionLines :: Region -> Int -- | Get string at region regionStr :: Region -> String -> String -- | Location of symbol data Location Location :: ModuleLocation -> Maybe Position -> Location [_locationModule] :: Location -> ModuleLocation [_locationPosition] :: Location -> Maybe Position packageName :: Lens' ModulePackage String packageVersion :: Lens' ModulePackage String package :: Lens' PackageConfig ModulePackage packageModules :: Lens' PackageConfig [Text] packageExposed :: Lens' PackageConfig Bool moduleFile :: Traversal' ModuleLocation FilePath moduleProject :: Traversal' ModuleLocation (Maybe Project) modulePackageDb :: Traversal' ModuleLocation PackageDb modulePackage :: Traversal' ModuleLocation (Maybe ModulePackage) cabalModuleName :: Traversal' ModuleLocation String moduleSourceName :: Traversal' ModuleLocation (Maybe String) positionLine :: Lens' Position Int positionColumn :: Lens' Position Int regionFrom :: Lens' Region Position regionTo :: Lens' Region Position locationModule :: Lens' Location ModuleLocation locationPosition :: Lens' Location (Maybe Position) -- | Get source module root directory, i.e. for "...srcFooBar.hs" with -- module Bar will return "...src" sourceModuleRoot :: Text -> FilePath -> FilePath -- | Get path of imported module >importedModulePath Foo.Bar -- "...srcFooBar.hs" Quux.Blah = "...srcQuuxBlah.hs" importedModulePath :: Text -> FilePath -> Text -> FilePath packageOpt :: Maybe ModulePackage -> [String] -- | Recalc positions to interpret '\t' as one symbol instead of N class RecalcTabs a -- | Interpret '\t' as one symbol instead of N recalcTabs :: RecalcTabs a => String -> Int -> a -> a -- | Inverse of recalcTabs: interpret '\t' as N symbols instead of 1 calcTabs :: RecalcTabs a => String -> Int -> a -> a instance Control.DeepSeq.NFData HsDev.Symbols.Location.Location instance GHC.Show.Show HsDev.Symbols.Location.Location instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Location.Location instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Location.Location instance HsDev.Symbols.Location.RecalcTabs HsDev.Symbols.Location.Position instance HsDev.Symbols.Location.RecalcTabs HsDev.Symbols.Location.Region instance GHC.Classes.Ord HsDev.Symbols.Location.Location instance GHC.Classes.Eq HsDev.Symbols.Location.Location instance Control.DeepSeq.NFData HsDev.Symbols.Location.Region instance GHC.Show.Show HsDev.Symbols.Location.Region instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Location.Region instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Location.Region instance GHC.Read.Read HsDev.Symbols.Location.Region instance GHC.Classes.Ord HsDev.Symbols.Location.Region instance GHC.Classes.Eq HsDev.Symbols.Location.Region instance Control.DeepSeq.NFData HsDev.Symbols.Location.Position instance GHC.Show.Show HsDev.Symbols.Location.Position instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Location.Position instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Location.Position instance GHC.Read.Read HsDev.Symbols.Location.Position instance GHC.Classes.Ord HsDev.Symbols.Location.Position instance GHC.Classes.Eq HsDev.Symbols.Location.Position instance Control.DeepSeq.NFData HsDev.Symbols.Location.ModuleLocation instance GHC.Show.Show HsDev.Symbols.Location.ModuleLocation instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Location.ModuleLocation instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Location.ModuleLocation instance System.Directory.Paths.Paths HsDev.Symbols.Location.ModuleLocation instance GHC.Classes.Ord HsDev.Symbols.Location.ModuleLocation instance GHC.Classes.Eq HsDev.Symbols.Location.ModuleLocation instance Control.DeepSeq.NFData HsDev.Symbols.Location.PackageConfig instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Location.PackageConfig instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Location.PackageConfig instance GHC.Show.Show HsDev.Symbols.Location.PackageConfig instance GHC.Read.Read HsDev.Symbols.Location.PackageConfig instance GHC.Classes.Ord HsDev.Symbols.Location.PackageConfig instance GHC.Classes.Eq HsDev.Symbols.Location.PackageConfig instance Control.DeepSeq.NFData HsDev.Symbols.Location.ModulePackage instance GHC.Show.Show HsDev.Symbols.Location.ModulePackage instance GHC.Read.Read HsDev.Symbols.Location.ModulePackage instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Location.ModulePackage instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Location.ModulePackage instance GHC.Classes.Ord HsDev.Symbols.Location.ModulePackage instance GHC.Classes.Eq HsDev.Symbols.Location.ModulePackage module HsDev.Symbols.Class class Symbol a symbolName :: Symbol a => a -> Text symbolQualifiedName :: Symbol a => a -> Text symbolDocs :: Symbol a => a -> Maybe Text symbolLocation :: Symbol a => a -> Location symbolModuleLocation :: Symbol a => a -> ModuleLocation module HsDev.Symbols.Documented -- | Documented symbol class Symbol a => Documented a where detailed = unlines . defaultDetailed brief :: Documented a => a -> String detailed :: Documented a => a -> String -- | Default detailed docs defaultDetailed :: Documented a => a -> [String] module HsDev.Tools.Types -- | Note severity data Severity Error :: Severity Warning :: Severity Hint :: Severity -- | Note over some region data Note a Note :: ModuleLocation -> Region -> Maybe Severity -> a -> Note a [_noteSource] :: Note a -> ModuleLocation [_noteRegion] :: Note a -> Region [_noteLevel] :: Note a -> Maybe Severity [_note] :: Note a -> a noteSource :: forall a_a1vCs. Lens' (Note a_a1vCs) ModuleLocation noteRegion :: forall a_a1vCs. Lens' (Note a_a1vCs) Region noteLevel :: forall a_a1vCs. Lens' (Note a_a1vCs) (Maybe Severity) note :: forall a_a1vCs a_a1vPy. Lens (Note a_a1vCs) (Note a_a1vPy) a_a1vCs a_a1vPy -- | Output message from some tool (ghc, ghc-mod, hlint) with optional -- suggestion data OutputMessage OutputMessage :: String -> Maybe String -> OutputMessage [_message] :: OutputMessage -> String [_messageSuggestion] :: OutputMessage -> Maybe String message :: Lens' OutputMessage String messageSuggestion :: Lens' OutputMessage (Maybe String) outputMessage :: String -> OutputMessage instance GHC.Show.Show HsDev.Tools.Types.OutputMessage instance GHC.Read.Read HsDev.Tools.Types.OutputMessage instance GHC.Classes.Ord HsDev.Tools.Types.OutputMessage instance GHC.Classes.Eq HsDev.Tools.Types.OutputMessage instance GHC.Base.Functor HsDev.Tools.Types.Note instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (HsDev.Tools.Types.Note a) instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (HsDev.Tools.Types.Note a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (HsDev.Tools.Types.Note a) instance HsDev.Symbols.Location.RecalcTabs (HsDev.Tools.Types.Note a) instance System.Directory.Paths.Paths (HsDev.Tools.Types.Note a) instance Control.DeepSeq.NFData HsDev.Tools.Types.OutputMessage instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Tools.Types.OutputMessage instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Types.OutputMessage instance GHC.Show.Show a => GHC.Show.Show (HsDev.Tools.Types.Note a) instance GHC.Classes.Eq a => GHC.Classes.Eq (HsDev.Tools.Types.Note a) instance GHC.Show.Show HsDev.Tools.Types.Severity instance GHC.Read.Read HsDev.Tools.Types.Severity instance GHC.Classes.Ord HsDev.Tools.Types.Severity instance GHC.Classes.Eq HsDev.Tools.Types.Severity instance GHC.Enum.Bounded HsDev.Tools.Types.Severity instance GHC.Enum.Enum HsDev.Tools.Types.Severity instance Control.DeepSeq.NFData HsDev.Tools.Types.Severity instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Tools.Types.Severity instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Types.Severity module HsDev.Types -- | hsdev exception type data HsDevError ModuleNotSource :: ModuleLocation -> HsDevError BrowseNoModuleInfo :: String -> HsDevError FileNotFound :: FilePath -> HsDevError ToolNotFound :: String -> HsDevError ProjectNotFound :: String -> HsDevError PackageNotFound :: String -> HsDevError ToolError :: String -> String -> HsDevError NotInspected :: ModuleLocation -> HsDevError InspectError :: String -> HsDevError InspectCabalError :: FilePath -> String -> HsDevError IOFailed :: String -> HsDevError GhcError :: String -> HsDevError RequestError :: String -> String -> HsDevError ResponseError :: String -> String -> HsDevError OtherError :: String -> HsDevError instance Control.DeepSeq.NFData HsDev.Types.HsDevError instance GHC.Show.Show HsDev.Types.HsDevError instance Text.Format.Formattable HsDev.Types.HsDevError instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Types.HsDevError instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Types.HsDevError instance GHC.Exception.Exception HsDev.Types.HsDevError module HsDev.Server.Message -- | Message with id to link request and response data Message a Message :: Maybe String -> a -> Message a [_messageId] :: Message a -> Maybe String [_message] :: Message a -> a messageId :: forall a_a1CSm. Lens' (Message a_a1CSm) (Maybe String) message :: forall a_a1CSm a_a1D0r. Lens (Message a_a1CSm) (Message a_a1D0r) a_a1CSm a_a1D0r -- | Get messages by id messagesById :: Maybe String -> [Message a] -> [a] -- | Notification from server data Notification Notification :: Value -> Notification -- | Result from server data Result -- | Result Result :: Value -> Result -- | Error Error :: HsDevError -> Result -- | Part of result list, returns via notification data ResultPart ResultPart :: Value -> ResultPart newtype Response Response :: Either Notification Result -> Response [unResponse] :: Response -> Either Notification Result isNotification :: Response -> Bool notification :: ToJSON a => a -> Response result :: ToJSON a => a -> Response responseError :: HsDevError -> Response resultPart :: ToJSON a => a -> Notification groupResponses :: [Response] -> [([Notification], Result)] responsesById :: Maybe String -> [Message Response] -> [([Notification], Result)] instance GHC.Show.Show HsDev.Server.Message.Response instance GHC.Show.Show HsDev.Server.Message.Result instance GHC.Show.Show HsDev.Server.Message.Notification instance GHC.Classes.Eq HsDev.Server.Message.Notification instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (HsDev.Server.Message.Message a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (HsDev.Server.Message.Message a) instance Data.Foldable.Foldable HsDev.Server.Message.Message instance Data.Traversable.Traversable HsDev.Server.Message.Message instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Message.Notification instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Message.Notification instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Message.Result instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Message.Result instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Message.ResultPart instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Message.ResultPart instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Message.Response instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Message.Response instance GHC.Base.Functor HsDev.Server.Message.Message instance GHC.Show.Show a => GHC.Show.Show (HsDev.Server.Message.Message a) instance GHC.Classes.Ord a => GHC.Classes.Ord (HsDev.Server.Message.Message a) instance GHC.Classes.Eq a => GHC.Classes.Eq (HsDev.Server.Message.Message a) module HsDev.Error -- | Throw HsDevError hsdevError :: MonadThrow m => HsDevError -> m a -- | Throw as OtherError hsdevOtherError :: (Exception e, MonadThrow m) => e -> m a -- | Throw as OtherError hsdevLift :: MonadThrow m => ExceptT String m a -> m a -- | Throw as some HsDevError hsdevLiftWith :: MonadThrow m => (String -> HsDevError) -> ExceptT String m a -> m a hsdevCatch :: MonadCatch m => m a -> m (Either HsDevError a) hsdevExcept :: MonadCatch m => m a -> ExceptT HsDevError m a -- | Rethrow IO exceptions as HsDevError hsdevLiftIO :: MonadCatch m => m a -> m a -- | Rethrow IO exceptions hsdevLiftIOWith :: MonadCatch m => (String -> HsDevError) -> m a -> m a -- | Ignore hsdev exception hsdevIgnore :: MonadCatch m => a -> m a -> m a -- | Handle hsdev exception hsdevHandle :: MonadCatch m => (HsDevError -> m a) -> m a -> m a -- | Log hsdev exception and rethrow hsdevLog :: MonadLog m => Level -> m a -> m a module HsDev.Project -- | infoSourceDirs lens with default infoSourceDirsDef :: Simple Lens Info [FilePath] -- | Analyze cabal file analyzeCabal :: String -> Either String ProjectDescription -- | Read project info from .cabal readProject :: FilePath -> IO Project -- | Load project description loadProject :: Project -> IO Project -- | Extensions for target withExtensions :: a -> Info -> Extensions a -- | Returns build targets infos infos :: ProjectDescription -> [Info] -- | Check if source related to target, source must be relative to project -- directory inTarget :: FilePath -> Info -> Bool -- | Get first target for source file fileTarget :: Project -> FilePath -> Maybe Info -- | Get possible targets for source file There can be many candidates in -- case of module related to several executables or tests fileTargets :: Project -> FilePath -> [Info] -- | Finds source dir file belongs to findSourceDir :: Project -> FilePath -> Maybe (Extensions FilePath) -- | Returns source dirs for library, executables and tests sourceDirs :: ProjectDescription -> [Extensions FilePath] -- | Get options for specific target targetOpts :: Info -> [String] -- | Extension as flag name showExtension :: Extension -> String -- | Convert -Xext to ext flagExtension :: String -> Maybe String -- | Convert ext to -Xext extensionFlag :: String -> String -- | Extensions as opts to GHC extensionsOpts :: Extensions a -> [String] module HsDev.Symbols.Types -- | What to exportimport for dataclass etc data ThingPart ThingNothing :: ThingPart ThingAll :: ThingPart ThingWith :: [Text] -> ThingPart -- | Module export data Export ExportName :: Maybe Text -> Text -> ThingPart -> Export [_exportQualified] :: Export -> Maybe Text [_exportName] :: Export -> Text [_exportPart] :: Export -> ThingPart ExportModule :: Text -> Export [_exportModule] :: Export -> Text exportQualified :: Traversal' Export (Maybe Text) exportName :: Traversal' Export Text exportPart :: Traversal' Export ThingPart exportModule :: Traversal' Export Text -- | Import spec data ImportSpec ImportSpec :: Text -> ThingPart -> ImportSpec [_importSpecName] :: ImportSpec -> Text [_importSpecPart] :: ImportSpec -> ThingPart importSpecName :: Lens' ImportSpec Text importSpecPart :: Lens' ImportSpec ThingPart -- | Import list data ImportList ImportList :: Bool -> [ImportSpec] -> ImportList [_hidingList] :: ImportList -> Bool [_importSpecs] :: ImportList -> [ImportSpec] hidingList :: Lens' ImportList Bool importSpecs :: Lens' ImportList [ImportSpec] -- | Module import data Import Import :: Text -> Bool -> Maybe Text -> Maybe ImportList -> Maybe Position -> Import [_importModuleName] :: Import -> Text [_importIsQualified] :: Import -> Bool [_importAs] :: Import -> Maybe Text [_importList] :: Import -> Maybe ImportList [_importPosition] :: Import -> Maybe Position importModuleName :: Lens' Import Text importIsQualified :: Lens' Import Bool importAs :: Lens' Import (Maybe Text) importList :: Lens' Import (Maybe ImportList) importPosition :: Lens' Import (Maybe Position) -- | Module id data ModuleId ModuleId :: Text -> ModuleLocation -> ModuleId [_moduleIdName] :: ModuleId -> Text [_moduleIdLocation] :: ModuleId -> ModuleLocation moduleIdName :: Lens' ModuleId Text moduleIdLocation :: Lens' ModuleId ModuleLocation -- | Module data Module Module :: Text -> Maybe Text -> ModuleLocation -> Maybe [Export] -> [Import] -> [Declaration] -> Module [_moduleName] :: Module -> Text [_moduleDocs] :: Module -> Maybe Text [_moduleLocation] :: Module -> ModuleLocation [_moduleExports] :: Module -> Maybe [Export] [_moduleImports] :: Module -> [Import] [_moduleDeclarations] :: Module -> [Declaration] moduleName :: Lens' Module Text moduleDocs :: Lens' Module (Maybe Text) moduleLocation :: Lens' Module ModuleLocation moduleExports :: Lens' Module (Maybe [Export]) moduleImports :: Lens' Module [Import] moduleDeclarations :: Lens' Module [Declaration] -- | Module contents moduleContents :: Module -> [String] moduleId :: Simple Lens Module ModuleId -- | Declaration data Declaration Declaration :: Text -> Maybe ModuleId -> Maybe [Import] -> Maybe Text -> Maybe Position -> DeclarationInfo -> Declaration [_declarationName] :: Declaration -> Text -- | Where declaration defined, Nothing if here [_declarationDefined] :: Declaration -> Maybe ModuleId -- | Declaration imported with. Nothing if unknown (cabal modules) -- or here (source file) [_declarationImported] :: Declaration -> Maybe [Import] [_declarationDocs] :: Declaration -> Maybe Text [_declarationPosition] :: Declaration -> Maybe Position [_declaration] :: Declaration -> DeclarationInfo declarationName :: Lens' Declaration Text declarationDefined :: Lens' Declaration (Maybe ModuleId) declarationImported :: Lens' Declaration (Maybe [Import]) declarationDocs :: Lens' Declaration (Maybe Text) declarationPosition :: Lens' Declaration (Maybe Position) declaration :: Lens' Declaration DeclarationInfo -- | Minimal declaration info without defined, docs and position minimalDecl :: Lens' Declaration Declaration -- | Common info for type, newtype, data and class data TypeInfo TypeInfo :: Maybe Text -> [Text] -> Maybe Text -> [Text] -> TypeInfo [_typeInfoContext] :: TypeInfo -> Maybe Text [_typeInfoArgs] :: TypeInfo -> [Text] [_typeInfoDefinition] :: TypeInfo -> Maybe Text [_typeInfoFunctions] :: TypeInfo -> [Text] typeInfoContext :: Lens' TypeInfo (Maybe Text) typeInfoArgs :: Lens' TypeInfo [Text] typeInfoDefinition :: Lens' TypeInfo (Maybe Text) typeInfoFunctions :: Lens' TypeInfo [Text] showTypeInfo :: TypeInfo -> String -> String -> String -- | Declaration info data DeclarationInfo Function :: Maybe Text -> [Declaration] -> Maybe Text -> DeclarationInfo [_functionType] :: DeclarationInfo -> Maybe Text [_localDeclarations] :: DeclarationInfo -> [Declaration] [_related] :: DeclarationInfo -> Maybe Text Type :: TypeInfo -> DeclarationInfo [_typeInfo] :: DeclarationInfo -> TypeInfo NewType :: TypeInfo -> DeclarationInfo [_typeInfo] :: DeclarationInfo -> TypeInfo Data :: TypeInfo -> DeclarationInfo [_typeInfo] :: DeclarationInfo -> TypeInfo Class :: TypeInfo -> DeclarationInfo [_typeInfo] :: DeclarationInfo -> TypeInfo functionType :: Traversal' DeclarationInfo (Maybe Text) localDeclarations :: Traversal' DeclarationInfo [Declaration] related :: Traversal' DeclarationInfo (Maybe Text) typeInfo :: Traversal' DeclarationInfo TypeInfo -- | Get function type of type info declarationInfo :: DeclarationInfo -> Either (Maybe Text, [Declaration], Maybe Text) TypeInfo declarationTypeCtor :: String -> TypeInfo -> DeclarationInfo declarationTypeName :: DeclarationInfo -> Maybe String -- | Symbol in context of some module data ModuleDeclaration ModuleDeclaration :: ModuleId -> Declaration -> ModuleDeclaration [_declarationModuleId] :: ModuleDeclaration -> ModuleId [_moduleDeclaration] :: ModuleDeclaration -> Declaration declarationModuleId :: Lens' ModuleDeclaration ModuleId moduleDeclaration :: Lens' ModuleDeclaration Declaration -- | Symbol exported with data ExportedDeclaration ExportedDeclaration :: [ModuleId] -> Declaration -> ExportedDeclaration [_exportedBy] :: ExportedDeclaration -> [ModuleId] [_exportedDeclaration] :: ExportedDeclaration -> Declaration exportedBy :: Lens' ExportedDeclaration [ModuleId] exportedDeclaration :: Lens' ExportedDeclaration Declaration -- | Inspection data data Inspection -- | No inspection InspectionNone :: Inspection -- | Time and flags of inspection InspectionAt :: POSIXTime -> [String] -> Inspection [_inspectionAt] :: Inspection -> POSIXTime [_inspectionOpts] :: Inspection -> [String] inspectionAt :: Traversal' Inspection POSIXTime inspectionOpts :: Traversal' Inspection [String] -- | Inspected entity data Inspected i t a Inspected :: Inspection -> i -> Set t -> Either HsDevError a -> Inspected i t a [_inspection] :: Inspected i t a -> Inspection [_inspectedId] :: Inspected i t a -> i [_inspectionTags] :: Inspected i t a -> Set t [_inspectionResult] :: Inspected i t a -> Either HsDevError a inspection :: forall i_a1K3e t_a1K3f a_a1K3g. Lens' (Inspected i_a1K3e t_a1K3f a_a1K3g) Inspection inspectedId :: forall i_a1K3e t_a1K3f a_a1K3g i_a1Mdf. Lens (Inspected i_a1K3e t_a1K3f a_a1K3g) (Inspected i_a1Mdf t_a1K3f a_a1K3g) i_a1K3e i_a1Mdf inspectionTags :: forall i_a1K3e t_a1K3f a_a1K3g t_a1Mdh. Lens (Inspected i_a1K3e t_a1K3f a_a1K3g) (Inspected i_a1K3e t_a1Mdh a_a1K3g) (Set t_a1K3f) (Set t_a1Mdh) inspectionResult :: forall i_a1K3e t_a1K3f a_a1K3g a_a1Mdg. Lens (Inspected i_a1K3e t_a1K3f a_a1K3g) (Inspected i_a1K3e t_a1K3f a_a1Mdg) (Either HsDevError a_a1K3g) (Either HsDevError a_a1Mdg) -- | Empty tags noTags :: Set t data ModuleTag InferredTypesTag :: ModuleTag RefinedDocsTag :: ModuleTag -- | Inspected module type InspectedModule = Inspected ModuleLocation ModuleTag Module notInspected :: ModuleLocation -> InspectedModule instance GHC.Enum.Bounded HsDev.Symbols.Types.ModuleTag instance GHC.Enum.Enum HsDev.Symbols.Types.ModuleTag instance GHC.Show.Show HsDev.Symbols.Types.ModuleTag instance GHC.Read.Read HsDev.Symbols.Types.ModuleTag instance GHC.Classes.Ord HsDev.Symbols.Types.ModuleTag instance GHC.Classes.Eq HsDev.Symbols.Types.ModuleTag instance GHC.Classes.Ord HsDev.Symbols.Types.Inspection instance GHC.Classes.Eq HsDev.Symbols.Types.Inspection instance GHC.Classes.Ord HsDev.Symbols.Types.ExportedDeclaration instance GHC.Classes.Eq HsDev.Symbols.Types.ExportedDeclaration instance GHC.Classes.Ord HsDev.Symbols.Types.ModuleDeclaration instance GHC.Classes.Eq HsDev.Symbols.Types.ModuleDeclaration instance GHC.Classes.Ord HsDev.Symbols.Types.Module instance GHC.Classes.Ord HsDev.Symbols.Types.Declaration instance GHC.Classes.Eq HsDev.Symbols.Types.Declaration instance GHC.Classes.Ord HsDev.Symbols.Types.DeclarationInfo instance GHC.Show.Show HsDev.Symbols.Types.TypeInfo instance GHC.Read.Read HsDev.Symbols.Types.TypeInfo instance GHC.Classes.Ord HsDev.Symbols.Types.TypeInfo instance GHC.Classes.Eq HsDev.Symbols.Types.TypeInfo instance GHC.Classes.Ord HsDev.Symbols.Types.ModuleId instance GHC.Classes.Eq HsDev.Symbols.Types.ModuleId instance GHC.Classes.Ord HsDev.Symbols.Types.Import instance GHC.Classes.Eq HsDev.Symbols.Types.Import instance GHC.Classes.Ord HsDev.Symbols.Types.ImportList instance GHC.Classes.Eq HsDev.Symbols.Types.ImportList instance GHC.Classes.Ord HsDev.Symbols.Types.ImportSpec instance GHC.Classes.Eq HsDev.Symbols.Types.ImportSpec instance GHC.Classes.Ord HsDev.Symbols.Types.Export instance GHC.Classes.Eq HsDev.Symbols.Types.Export instance GHC.Classes.Ord HsDev.Symbols.Types.ThingPart instance GHC.Classes.Eq HsDev.Symbols.Types.ThingPart instance Control.DeepSeq.NFData HsDev.Symbols.Types.ThingPart instance GHC.Show.Show HsDev.Symbols.Types.ThingPart instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.ThingPart instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.ThingPart instance Control.DeepSeq.NFData HsDev.Symbols.Types.Export instance GHC.Show.Show HsDev.Symbols.Types.Export instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.Export instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.Export instance Control.DeepSeq.NFData HsDev.Symbols.Types.ImportSpec instance GHC.Show.Show HsDev.Symbols.Types.ImportSpec instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.ImportSpec instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.ImportSpec instance Control.DeepSeq.NFData HsDev.Symbols.Types.ImportList instance GHC.Show.Show HsDev.Symbols.Types.ImportList instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.ImportList instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.ImportList instance Control.DeepSeq.NFData HsDev.Symbols.Types.Import instance GHC.Show.Show HsDev.Symbols.Types.Import instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.Import instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.Import instance Control.DeepSeq.NFData HsDev.Symbols.Types.ModuleId instance GHC.Show.Show HsDev.Symbols.Types.ModuleId instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.ModuleId instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.ModuleId instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.Module instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.Module instance Control.DeepSeq.NFData HsDev.Symbols.Types.Module instance GHC.Classes.Eq HsDev.Symbols.Types.Module instance GHC.Show.Show HsDev.Symbols.Types.Module instance Control.DeepSeq.NFData HsDev.Symbols.Types.Declaration instance GHC.Show.Show HsDev.Symbols.Types.Declaration instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.Declaration instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.Declaration instance Control.DeepSeq.NFData HsDev.Symbols.Types.TypeInfo instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.TypeInfo instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.TypeInfo instance Control.DeepSeq.NFData HsDev.Symbols.Types.DeclarationInfo instance GHC.Classes.Eq HsDev.Symbols.Types.DeclarationInfo instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.DeclarationInfo instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.DeclarationInfo instance Control.DeepSeq.NFData HsDev.Symbols.Types.ModuleDeclaration instance GHC.Show.Show HsDev.Symbols.Types.ModuleDeclaration instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.ModuleDeclaration instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.ModuleDeclaration instance Control.DeepSeq.NFData HsDev.Symbols.Types.ExportedDeclaration instance GHC.Show.Show HsDev.Symbols.Types.ExportedDeclaration instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.ExportedDeclaration instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.ExportedDeclaration instance Control.DeepSeq.NFData HsDev.Symbols.Types.Inspection instance GHC.Show.Show HsDev.Symbols.Types.Inspection instance GHC.Read.Read Data.Time.Clock.POSIX.POSIXTime instance GHC.Base.Monoid HsDev.Symbols.Types.Inspection instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.Inspection instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.Inspection instance (GHC.Classes.Eq i, GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (HsDev.Symbols.Types.Inspected i t a) instance (GHC.Classes.Ord i, GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (HsDev.Symbols.Types.Inspected i t a) instance GHC.Base.Functor (HsDev.Symbols.Types.Inspected i t) instance Data.Foldable.Foldable (HsDev.Symbols.Types.Inspected i t) instance Data.Traversable.Traversable (HsDev.Symbols.Types.Inspected i t) instance (Control.DeepSeq.NFData i, Control.DeepSeq.NFData t, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (HsDev.Symbols.Types.Inspected i t a) instance Control.DeepSeq.NFData HsDev.Symbols.Types.ModuleTag instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.ModuleTag instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.ModuleTag instance GHC.Show.Show HsDev.Symbols.Types.InspectedModule instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.InspectedModule instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.InspectedModule instance HsDev.Symbols.Class.Symbol HsDev.Symbols.Types.Module instance HsDev.Symbols.Class.Symbol HsDev.Symbols.Types.ModuleId instance HsDev.Symbols.Class.Symbol HsDev.Symbols.Types.Declaration instance HsDev.Symbols.Class.Symbol HsDev.Symbols.Types.ModuleDeclaration instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Types.ModuleId instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Types.Module instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Types.Declaration instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Types.ModuleDeclaration module HsDev.Symbols -- | Get name of export export :: Export -> Text -- | Does name pass thing spec passThingSpec :: Text -> ThingPart -> Bool -- | Does declaration pass import-list spec passImportSpec :: Declaration -> ImportSpec -> Bool -- | Check whether declaration passes import list imported :: Declaration -> ImportList -> Bool -- | Check whether declaration passes export exported :: Declaration -> Export -> Bool -- | Get import module names - full and synonym importNames :: Import -> [Text] -- | Simple import import_ :: Text -> Import class Symbol a symbolName :: Symbol a => a -> Text symbolQualifiedName :: Symbol a => a -> Text symbolDocs :: Symbol a => a -> Maybe Text symbolLocation :: Symbol a => a -> Location unnamedModuleId :: ModuleLocation -> ModuleId sortDeclarations :: [Declaration] -> [Declaration] -- | Bring locals to top moduleLocals :: Module -> Module -- | Set all declaration definedIn to this module setDefinedIn :: Module -> Module -- | Drop all declarations, that not defined in this module dropExternals :: Module -> Module -- | Clear definedIn information clearDefinedIn :: Module -> Module -- | Get declarations with locals moduleLocalDeclarations :: Module -> [Declaration] -- | Get list of declarations as ModuleDeclaration moduleModuleDeclarations :: Module -> [ModuleDeclaration] class Locals a locals :: Locals a => a -> [Declaration] where_ :: Locals a => a -> [Declaration] -> a decl :: Text -> DeclarationInfo -> Declaration definedIn :: Declaration -> ModuleId -> Declaration declarationLocals :: Declaration -> [Declaration] -- | Get scopes of Declaration, where Nothing is global -- scope scopes :: Declaration -> [Maybe Text] -- | Merge ModuleDeclaration into ExportedDeclaration mergeExported :: [ModuleDeclaration] -> [ExportedDeclaration] -- | Imported module can be accessed via qualifier importQualifier :: Maybe Text -> Import -> Bool -- | Find project file is related to locateProject :: FilePath -> IO (Maybe Project) -- | Search project up searchProject :: FilePath -> IO (Maybe Project) -- | Locate source dir of file locateSourceDir :: FilePath -> IO (Maybe (Extensions FilePath)) -- | Make Info for standalone Module standaloneInfo :: [PackageConfig] -> Module -> Info -- | Options for GHC of module and project moduleOpts :: [PackageConfig] -> Module -> [String] -- | Add declaration to module addDeclaration :: Declaration -> Module -> Module -- | Unalias import name unalias :: Module -> Text -> [Text] -- | Set tag to Inspected setTag :: Ord t => t -> Inspected i t a -> Inspected i t a -- | Check whether Inspected has tag hasTag :: Ord t => t -> Inspected i t a -> Bool -- | Drop tag from Inspected removeTag :: Ord t => t -> Inspected i t a -> Inspected i t a -- | Drop all tags dropTags :: Inspected i t a -> Inspected i t a instance HsDev.Symbols.Locals HsDev.Symbols.Types.Declaration instance HsDev.Symbols.Locals HsDev.Symbols.Types.DeclarationInfo module HsDev.Symbols.Util -- | Get module project projectOf :: ModuleId -> Maybe Project -- | Get module cabal packageDbOf :: ModuleId -> Maybe PackageDb -- | Get module package packageOf :: ModuleId -> Maybe ModulePackage -- | Check if module in project inProject :: Project -> ModuleId -> Bool -- | Check if module in deps of project target inDepsOfTarget :: Info -> ModuleId -> Bool -- | Check if module in deps of source inDepsOfFile :: Project -> FilePath -> ModuleId -> Bool -- | Check if module in deps of project inDepsOfProject :: Project -> ModuleId -> Bool -- | Check if module in package-db inPackageDb :: PackageDb -> ModuleId -> Bool -- | Check if module in one of sandboxes inPackageDbStack :: PackageDbStack -> ModuleId -> Bool -- | Check if module in package inPackage :: String -> ModuleId -> Bool inVersion :: String -> ModuleId -> Bool -- | Check if module in file inFile :: FilePath -> ModuleId -> Bool -- | Check if module in source inModuleSource :: Maybe String -> ModuleId -> Bool -- | Check if declaration is in module inModule :: String -> ModuleId -> Bool -- | Check if module defined in file byFile :: ModuleId -> Bool -- | Check if module got from cabal database installed :: ModuleId -> Bool -- | Check if module is standalone standalone :: ModuleId -> Bool -- | Get list of imports imports :: Module -> [Import] -- | Get list of imports, which can be accessed with specified qualifier or -- unqualified qualifier :: Module -> Maybe String -> [Import] -- | Check if module imported via imports specified moduleImported :: ModuleId -> [Import] -> Bool -- | Check if module visible from this module within this project visible :: Project -> ModuleId -> ModuleId -> Bool -- | Check if module is in scope with qualifier inScope :: Module -> Maybe String -> ModuleId -> Bool -- | Select symbols with last package version newestPackage :: Symbol a => [a] -> [a] -- | Select module, defined by sources sourceModule :: Maybe Project -> [Module] -> Maybe Module -- | Select module, visible in project or cabal TODO: PackageDbStack? visibleModule :: PackageDb -> Maybe Project -> [Module] -> Maybe Module -- | Select preferred visible module TODO: PackageDbStack? preferredModule :: PackageDb -> Maybe Project -> [ModuleId] -> Maybe ModuleId -- | Remove duplicate modules, leave only preferredModule TODO: -- PackageDbStack? uniqueModules :: PackageDb -> Maybe Project -> [ModuleId] -> [ModuleId] -- | Select value, satisfying to all predicates allOf :: [a -> Bool] -> a -> Bool -- | Select value, satisfying one of predicates anyOf :: [a -> Bool] -> a -> Bool module HsDev.Watcher.Types data Watched WatchedProject :: Project -> [String] -> Watched WatchedPackageDb :: PackageDbStack -> [String] -> Watched WatchedModule :: Watched type Watcher = Watcher Watched -- | Stack of PackageDb in reverse order data PackageDbStack -- | Cabal project data Project module HsDev.Watcher -- | Watch for project sources changes watchProject :: Watcher -> Project -> [String] -> IO () -- | Watch for standalone source watchModule :: Watcher -> ModuleLocation -> IO () -- | Watch for top of package-db stack watchPackageDb :: Watcher -> PackageDbStack -> [String] -> IO () -- | Watch for package-db stack watchPackageDbStack :: Watcher -> PackageDbStack -> [String] -> IO () unwatchProject :: Watcher -> Project -> IO () unwatchModule :: Watcher -> ModuleLocation -> IO () -- | Unwatch package-db unwatchPackageDb :: Watcher -> PackageDb -> IO () isSource :: Event -> Bool isCabal :: Event -> Bool isConf :: Event -> Bool module HsDev.Tools.Base -- | Run tool, throwing HsDevError on fail runTool :: FilePath -> [String] -> String -> IO String -- | Run tool with not stdin runTool_ :: FilePath -> [String] -> IO String type Result = Either String String type ToolM a = ExceptT String IO a -- | Run command and wait for result runWait :: FilePath -> [String] -> String -> IO Result -- | Run command with no input runWait_ :: FilePath -> [String] -> IO Result -- | Tool tool :: FilePath -> [String] -> String -> ToolM String -- | Tool with no input tool_ :: FilePath -> [String] -> ToolM String matchRx :: String -> String -> Maybe (Int -> Maybe String) splitRx :: String -> String -> [String] replaceRx :: String -> String -> String -> String at :: (Int -> Maybe String) -> Int -> String at_ :: (Int -> Maybe String) -> Int -> String inspect :: MonadCatch m => ModuleLocation -> m Inspection -> m Module -> m InspectedModule type ReadM a = StateT String [] a -- | Parse readable value readParse :: Read a => ReadM a -- | Run parser parseReads :: String -> ReadM a -> [a] -- | Run parser and select first result parseRead :: String -> ReadM a -> Maybe a module HsDev.Tools.AutoFix data Correction Correction :: String -> Replace String -> Correction [_correctionMessage] :: Correction -> String [_corrector] :: Correction -> Replace String correctionMessage :: Lens' Correction String corrector :: Lens' Correction (Replace String) corrections :: [Note OutputMessage] -> [Note Correction] -- | Apply corrections autoFix :: [Note Correction] -> ([Note Correction], Maybe String) -> ([Note Correction], Maybe String) type CorrectorMatch = Note OutputMessage -> Maybe (Note Correction) correctors :: [CorrectorMatch] match :: String -> ((Int -> Maybe String) -> Region -> Correction) -> CorrectorMatch findCorrector :: Note OutputMessage -> Maybe (Note Correction) instance GHC.Show.Show HsDev.Tools.AutoFix.Correction instance GHC.Classes.Eq HsDev.Tools.AutoFix.Correction instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Tools.AutoFix.Correction instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.AutoFix.Correction module HsDev.Tools.Cabal data CabalPackage CabalPackage :: String -> Maybe String -> Maybe Version -> [Version] -> Maybe String -> Maybe License -> CabalPackage [cabalPackageName] :: CabalPackage -> String [cabalPackageSynopsis] :: CabalPackage -> Maybe String [cabalPackageDefaultVersion] :: CabalPackage -> Maybe Version [cabalPackageInstalledVersions] :: CabalPackage -> [Version] [cabalPackageHomepage] :: CabalPackage -> Maybe String [cabalPackageLicense] :: CabalPackage -> Maybe License cabalList :: [String] -> ToolM [CabalPackage] -- | A Version represents the version of a software entity. -- -- An instance of Eq is provided, which implements exact equality -- modulo reordering of the tags in the versionTags field. -- -- An instance of Ord is also provided, which gives lexicographic -- ordering on the versionBranch fields (i.e. 2.1 > 2.0, 1.2.3 -- > 1.2.2, etc.). This is expected to be sufficient for many uses, -- but note that you may need to use a more specific ordering for your -- versioning scheme. For example, some versioning schemes may include -- pre-releases which have tags "pre1", "pre2", and so -- on, and these would need to be taken into account when determining -- ordering. In some cases, date ordering may be more appropriate, so the -- application would have to look for date tags in the -- versionTags field and compare those. The bottom line is, don't -- always assume that compare and other Ord operations are -- the right thing for every Version. -- -- Similarly, concrete representations of versions may differ. One -- possible concrete representation is provided (see showVersion -- and parseVersion), but depending on the application a different -- concrete representation may be more appropriate. data Version :: * -- | Indicates the license under which a package's source code is released. -- Versions of the licenses not listed here will be rejected by Hackage -- and cause cabal check to issue a warning. data License :: * -- | GNU General Public License, version 2 or version 3. GPL :: Maybe Version -> License -- | GNU Affero General Public License, version 3. AGPL :: Maybe Version -> License -- | GNU Lesser General Public License, version 2.1 or version -- 3. LGPL :: Maybe Version -> License -- | 2-clause BSD license. BSD2 :: License -- | 3-clause BSD license. BSD3 :: License -- | 4-clause BSD license. This license has not been approved by the -- OSI and is incompatible with the GNU GPL. It is provided for -- historical reasons and should be avoided. BSD4 :: License -- | MIT license. MIT :: License -- | ISC license ISC :: License -- | Mozilla Public License, version 2.0. MPL :: Version -> License -- | Apache License, version 2.0. Apache :: Maybe Version -> License -- | The author of a package disclaims any copyright to its source code and -- dedicates it to the public domain. This is not a software license. -- Please note that it is not possible to dedicate works to the public -- domain in every jurisdiction, nor is a work that is in the public -- domain in one jurisdiction necessarily in the public domain elsewhere. PublicDomain :: License -- | Explicitly 'All Rights Reserved', eg for proprietary software. The -- package may not be legally modified or redistributed by anyone but the -- rightsholder. AllRightsReserved :: License -- | No license specified which legally defaults to 'All Rights Reserved'. -- The package may not be legally modified or redistributed by anyone but -- the rightsholder. UnspecifiedLicense :: License -- | Any other software license. OtherLicense :: License -- | Indicates an erroneous license name. UnknownLicense :: String -> License instance GHC.Show.Show HsDev.Tools.Cabal.CabalPackage instance GHC.Read.Read HsDev.Tools.Cabal.CabalPackage instance GHC.Classes.Eq HsDev.Tools.Cabal.CabalPackage instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Tools.Cabal.CabalPackage instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Cabal.CabalPackage module HsDev.Tools.HDocs -- | Get docs for modules hdocsy :: [ModuleLocation] -> [String] -> IO [Map String String] -- | Get docs for module hdocs :: ModuleLocation -> [String] -> IO (Map String String) -- | Get all docs hdocsCabal :: PackageDbStack -> [String] -> ExceptT String IO (Map String (Map String String)) -- | Set docs for module setDocs :: Map String String -> Module -> Module -- | Load docs for module loadDocs :: [String] -> Module -> IO Module hdocsProcess :: String -> [String] -> IO (Maybe (Map String String)) module HsDev.Tools.HLint hlint :: FilePath -> Maybe String -> ExceptT String IO [Note OutputMessage] hlintFile :: FilePath -> ExceptT String IO [Note OutputMessage] hlintSource :: FilePath -> String -> ExceptT String IO [Note OutputMessage] instance GHC.Classes.Ord HsDev.Tools.HLint.Indent instance GHC.Classes.Eq HsDev.Tools.HLint.Indent instance GHC.Show.Show HsDev.Tools.HLint.Indent module HsDev.Tools.Hayoo -- | Hayoo response data HayooResult HayooResult :: Int -> Int -> Int -> [HayooSymbol] -> HayooResult [resultMax] :: HayooResult -> Int [resultOffset] :: HayooResult -> Int [resultCount] :: HayooResult -> Int [resultResult] :: HayooResult -> [HayooSymbol] -- | Hayoo symbol data HayooSymbol HayooSymbol :: String -> String -> String -> String -> String -> String -> String -> [String] -> Double -> String -> HayooSymbol [resultUri] :: HayooSymbol -> String [tag] :: HayooSymbol -> String [hayooPackage] :: HayooSymbol -> String [hayooName] :: HayooSymbol -> String [hayooSource] :: HayooSymbol -> String [hayooDescription] :: HayooSymbol -> String [hayooSignature] :: HayooSymbol -> String [hayooModules] :: HayooSymbol -> [String] [hayooScore] :: HayooSymbol -> Double [hayooType] :: HayooSymbol -> String -- | HayooFunction as Declaration hayooAsDeclaration :: HayooSymbol -> Maybe ModuleDeclaration -- | Search hayoo hayoo :: String -> Maybe Int -> ExceptT String IO HayooResult -- | Remove tags in description untagDescription :: String -> String instance GHC.Show.Show HsDev.Tools.Hayoo.HayooResult instance GHC.Read.Read HsDev.Tools.Hayoo.HayooResult instance GHC.Classes.Ord HsDev.Tools.Hayoo.HayooResult instance GHC.Classes.Eq HsDev.Tools.Hayoo.HayooResult instance GHC.Show.Show HsDev.Tools.Hayoo.HayooSymbol instance GHC.Read.Read HsDev.Tools.Hayoo.HayooSymbol instance GHC.Classes.Ord HsDev.Tools.Hayoo.HayooSymbol instance GHC.Classes.Eq HsDev.Tools.Hayoo.HayooSymbol instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Hayoo.HayooResult instance HsDev.Symbols.Class.Symbol HsDev.Tools.Hayoo.HayooSymbol instance HsDev.Symbols.Documented.Documented HsDev.Tools.Hayoo.HayooSymbol instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Hayoo.HayooSymbol instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Hayoo.HayooValue module Data.Maybe.JustIf -- | Return Just if True justIf :: a -> Bool -> Maybe a -- | Return Just if f x = True justWhen :: a -> (a -> Bool) -> Maybe a -- | Flipped version of justIf soJust :: Bool -> a -> Maybe a module Data.Lisp data Lisp Null :: Lisp Bool :: Bool -> Lisp Symbol :: String -> Lisp String :: String -> Lisp Number :: Scientific -> Lisp List :: [Lisp] -> Lisp lisp :: Int -> ReadP Lisp encodeLisp :: ToJSON a => a -> ByteString decodeLisp :: FromJSON a => ByteString -> Either String a instance GHC.Classes.Eq Data.Lisp.Lisp instance GHC.Read.Read Data.Lisp.Lisp instance GHC.Show.Show Data.Lisp.Lisp instance Data.Aeson.Types.ToJSON.ToJSON Data.Lisp.Lisp instance Data.Aeson.Types.FromJSON.FromJSON Data.Lisp.Lisp module Data.Help class Help a brief :: Help a => a -> String help :: Help a => a -> [String] indent :: String -> String indentHelp :: [String] -> [String] detailed :: Help a => a -> [String] indented :: Help a => a -> [String] module Data.Group -- | Group is monoid with invertibility But for our purposes we prefer two -- functions: add and sub. class Eq a => Group a add :: Group a => a -> a -> a sub :: Group a => a -> a -> a zero :: Group a => a -- | Sums list groupSum :: Group a => [a] -> a instance GHC.Classes.Eq a => Data.Group.Group [a] instance GHC.Classes.Ord a => Data.Group.Group (Data.Set.Base.Set a) instance (GHC.Classes.Ord k, Data.Group.Group a) => Data.Group.Group (Data.Map.Base.Map k a) module HsDev.Database -- | HsDev database data Database Database :: [InspectedModule] -> [Project] -> Database [databaseModules] :: Database -> [InspectedModule] [databaseProjects] :: Database -> [Project] -- | Database intersection, prefers first database data databaseIntersection :: Database -> Database -> Database -- | Check if database is empty nullDatabase :: Database -> Bool -- | Bring all locals to scope databaseLocals :: Database -> Database -- | All scanned sandboxes databasePackageDbs :: Database -> [PackageDb] -- | All modules allModules :: Database -> [Module] -- | All declarations allDeclarations :: Database -> [ModuleDeclaration] -- | All packages allPackages :: Database -> [ModulePackage] -- | Make database from module fromModule :: InspectedModule -> Database -- | Make database from project fromProject :: Project -> Database -- | Filter database by predicate filterDB :: (ModuleId -> Bool) -> (Project -> Bool) -> Database -> Database -- | Project database projectDB :: Project -> Database -> Database -- | Package-db database packageDbDB :: PackageDb -> Database -> Database packageDbStackDB :: PackageDbStack -> Database -> Database -- | Standalone database standaloneDB :: Database -> Database -- | Select module by predicate selectModules :: (Module -> Bool) -> Database -> [Module] -- | Select declaration by predicate selectDeclarations :: (ModuleDeclaration -> Bool) -> Database -> [ModuleDeclaration] -- | Lookup module by its location and name lookupModule :: ModuleLocation -> Database -> Maybe Module -- | Lookup inspected module lookupInspected :: ModuleLocation -> Database -> Maybe InspectedModule -- | Lookup module by its source file lookupFile :: FilePath -> Database -> Maybe Module -- | Refine project refineProject :: Database -> Project -> Maybe Project -- | Get inspected module getInspected :: Database -> Module -> InspectedModule -- | Append database append :: Database -> Database -> Database -- | Remove database remove :: Database -> Database -> Database -- | Structured database data Structured Structured :: Map PackageDb Database -> Map FilePath Database -> Database -> Structured [structuredPackageDbs] :: Structured -> Map PackageDb Database [structuredProjects] :: Structured -> Map FilePath Database [structuredFiles] :: Structured -> Database structured :: [Database] -> [Database] -> Database -> Either String Structured structurize :: Database -> Structured merge :: Structured -> Database -- | A Map from keys k to values a. data Map k a :: * -> * -> * instance GHC.Classes.Ord HsDev.Database.Structured instance GHC.Classes.Eq HsDev.Database.Structured instance GHC.Classes.Ord HsDev.Database.Database instance GHC.Classes.Eq HsDev.Database.Database instance Control.DeepSeq.NFData HsDev.Database.Database instance Data.Group.Group HsDev.Database.Database instance GHC.Base.Monoid HsDev.Database.Database instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Database.Database instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Database.Database instance Control.DeepSeq.NFData HsDev.Database.Structured instance Data.Group.Group HsDev.Database.Structured instance GHC.Base.Monoid HsDev.Database.Structured instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Database.Structured instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Database.Structured module HsDev.Cache -- | Escape path escapePath :: FilePath -> FilePath -- | Name of cache for version versionCache :: FilePath -- | Name of cache for cabal packageDbCache :: PackageDb -> FilePath -- | Name of cache for projects projectCache :: Project -> FilePath -- | Name of cache for standalone files standaloneCache :: FilePath -- | Dump database to file dump :: FilePath -> Database -> IO () -- | Load database from file, strict load :: FilePath -> IO (Either String Database) -- | Write version writeVersion :: FilePath -> IO () -- | Read version readVersion :: FilePath -> IO (Maybe [Int]) -- | HsDev database data Database module HsDev.Cache.Structured -- | Write cache dump :: FilePath -> Structured -> IO () -- | Load all cache load :: FilePath -> IO (Either String Structured) -- | Load cabal from cache loadPackageDb :: PackageDb -> FilePath -> ExceptT String IO Structured -- | Load project from cache loadProject :: FilePath -> FilePath -> ExceptT String IO Structured -- | Load standalone files loadFiles :: (FilePath -> Bool) -> FilePath -> ExceptT String IO Structured module HsDev.Symbols.Resolve -- | Resolve monad uses existing Database and -- ResolvedTree as state. newtype ResolveM a ResolveM :: ReaderT (Database, ModuleMap) (State ResolvedTree) a -> ResolveM a [runResolveM] :: ResolveM a -> ReaderT (Database, ModuleMap) (State ResolvedTree) a -- | Tree of resolved modules type ResolvedTree = Map ModuleId ResolvedModule -- | Module with declarations bringed to scope and with exported -- declarations data ResolvedModule ResolvedModule :: Module -> [Declaration] -> [Declaration] -> ResolvedModule [_resolvedModule] :: ResolvedModule -> Module [_resolvedScope] :: ResolvedModule -> [Declaration] [_resolvedExports] :: ResolvedModule -> [Declaration] resolvedModule :: Lens' ResolvedModule Module resolvedScope :: Lens' ResolvedModule [Declaration] resolvedExports :: Lens' ResolvedModule [Declaration] -- | Make Module with scope declarations scopeModule :: ResolvedModule -> Module -- | Make Module with exported only declarations exportsModule :: ResolvedModule -> Module -- | Get top-level scope resolvedTopScope :: ResolvedModule -> [Declaration] -- | Resolve modules, function is not IO, so all file names must be -- canonicalized resolve :: Traversable t => Database -> t Module -> t ResolvedModule -- | Resolve one module resolveOne :: Database -> Module -> ResolvedModule -- | Resolve module resolveModule :: Module -> ResolveM ResolvedModule -- | Bring declarations into scope by imports resolveImports :: Module -> [Import] -> ResolveM [Declaration] -- | Bring declarations into scope, first parameter is set of visible -- packages resolveImport :: Set String -> Module -> Import -> ResolveM [Declaration] -- | Merge imported declarations mergeImported :: [Declaration] -> [Declaration] instance Control.Monad.Reader.Class.MonadReader (HsDev.Database.Database, HsDev.Symbols.Resolve.ModuleMap) HsDev.Symbols.Resolve.ResolveM instance Control.Monad.State.Class.MonadState HsDev.Symbols.Resolve.ResolvedTree HsDev.Symbols.Resolve.ResolveM instance GHC.Base.Monad HsDev.Symbols.Resolve.ResolveM instance GHC.Base.Applicative HsDev.Symbols.Resolve.ResolveM instance GHC.Base.Functor HsDev.Symbols.Resolve.ResolveM module HsDev.Commands -- | Find declaration by name findDeclaration :: Database -> String -> ExceptT String IO [ModuleDeclaration] -- | Find module by name findModule :: Database -> String -> ExceptT String IO [Module] -- | Find module in file fileModule :: Database -> FilePath -> ExceptT String IO Module -- | Lookup visible within project/cabal symbol lookupSymbol :: Database -> FilePath -> String -> ExceptT String IO [ModuleDeclaration] -- | Whois symbol in scope whois :: Database -> FilePath -> String -> ExceptT String IO [Declaration] -- | Accessible modules scopeModules :: Database -> FilePath -> ExceptT String IO [Module] -- | Symbols in scope scope :: Database -> FilePath -> Bool -> ExceptT String IO [Declaration] -- | Completions completions :: Database -> FilePath -> String -> Bool -> ExceptT String IO [Declaration] -- | Module completions moduleCompletions :: Database -> [Module] -> String -> ExceptT String IO [String] -- | Check module checkModule :: (ModuleId -> Bool) -> (ModuleDeclaration -> Bool) -- | Check declaration checkDeclaration :: (Declaration -> Bool) -> (ModuleDeclaration -> Bool) -- | Allow only selected cabal sandbox restrictPackageDb :: PackageDb -> ModuleId -> Bool -- | Allow only selected cabal sandboxes restrictPackageDbStack :: PackageDbStack -> ModuleId -> Bool -- | Check whether module is visible from source file visibleFrom :: Maybe Project -> Module -> ModuleId -> Bool -- | Split identifier into module name and identifier itself splitIdentifier :: String -> (Maybe String, String) -- | Get context file and project fileCtx :: Database -> FilePath -> ExceptT String IO (FilePath, Module, Maybe Project) -- | Try get context file fileCtxMaybe :: Database -> FilePath -> ExceptT String IO (FilePath, Maybe Module, Maybe Project) module Data.Deps -- | Dependency map data Deps a Deps :: Map a [a] -> Deps a [_depsMap] :: Deps a -> Map a [a] depsMap :: Lens (Deps a) (Deps b) (Map a [a]) (Map b [b]) mapDeps :: Ord b => (a -> b) -> Deps a -> Deps b -- | Make single dependency dep :: a -> a -> Deps a -- | Make dependency for one target, note that order of dependencies is -- matter deps :: a -> [a] -> Deps a -- | Inverse dependencies, i.e. make map where keys are dependencies and -- elements are targets depends on it inverse :: Ord a => Deps a -> Deps a -- | Flatten dependencies so that there will be no indirect dependencies flatten :: Ord a => Deps a -> Deps a instance GHC.Classes.Ord a => GHC.Base.Monoid (Data.Deps.Deps a) instance GHC.Classes.Ord a => Control.Lens.At.Ixed (Data.Deps.Deps a) instance GHC.Classes.Ord a => Control.Lens.At.At (Data.Deps.Deps a) module Data.Async -- | Event on async value data Event a Append :: a -> Event a Remove :: a -> Event a Clear :: Event a Modify :: (a -> a) -> Event a Action :: (a -> IO a) -> Event a -- | Event to function event :: Group a => Event a -> a -> IO a data Async a Async :: MVar a -> Chan (Event a) -> Async a [asyncVar] :: Async a -> MVar a [asyncEvents] :: Async a -> Chan (Event a) newAsync :: (NFData a, Group a) => IO (Async a) readAsync :: Async a -> IO a modifyAsync :: Async a -> Event a -> IO () -- | Group is monoid with invertibility But for our purposes we prefer two -- functions: add and sub. class Eq a => Group a -- | A class of types that can be fully evaluated. class NFData a module HsDev.Database.Async update :: MonadIO m => Async Database -> m Database -> m () clear :: MonadIO m => Async Database -> m Database -> m () -- | This function is used to ensure that all previous updates were applied wait :: MonadIO m => Async Database -> m () module Control.Concurrent.Util fork :: MonadIO m => IO () -> m () timeout :: Int -> IO a -> IO (Maybe a) module Control.Concurrent.FiniteChan -- | Chan is stoppable channel unline Chan data Chan a -- | Create channel newChan :: IO (Chan a) -- | Duplicate channel dupChan :: Chan a -> IO (Chan a) -- | Is channel opened openedChan :: Chan a -> IO Bool -- | Is channel closing/closed closedChan :: Chan a -> IO Bool -- | Is channed closed and all data allready read from it doneChan :: Chan a -> IO Bool -- | Write data to channel sendChan :: Chan a -> a -> IO Bool -- | Put data to channel putChan :: Chan a -> a -> IO () -- | Get data from channel getChan :: Chan a -> IO (Maybe a) -- | Read channel contents readChan :: Chan a -> IO [a] -- | Close channel. putChan will still work, but no data will be -- available on other ending closeChan :: Chan a -> IO () -- | Stop channel and return all data stopChan :: Chan a -> IO [a] instance GHC.Show.Show Control.Concurrent.FiniteChan.State instance GHC.Read.Read Control.Concurrent.FiniteChan.State instance GHC.Enum.Bounded Control.Concurrent.FiniteChan.State instance GHC.Enum.Enum Control.Concurrent.FiniteChan.State instance GHC.Classes.Ord Control.Concurrent.FiniteChan.State instance GHC.Classes.Eq Control.Concurrent.FiniteChan.State module Control.Concurrent.Worker data Worker m Worker :: Chan (Async (), m ()) -> (forall a. m a -> m a) -> MVar (Async ()) -> IO () -> Worker m [workerChan] :: Worker m -> Chan (Async (), m ()) [workerWrap] :: Worker m -> forall a. m a -> m a [workerTask] :: Worker m -> MVar (Async ()) [workerTouch] :: Worker m -> IO () data WorkerStopped WorkerStopped :: WorkerStopped -- | Create new worker startWorker :: MonadIO m => (m () -> IO ()) -> (m () -> m ()) -> (forall a. m a -> m a) -> IO (Worker m) workerDone :: Worker m -> IO Bool sendTask :: (MonadCatch m, MonadIO m) => Worker m -> m a -> IO (Async a) pushTask :: (MonadCatch m, MonadIO m) => Worker m -> m a -> IO (Async a) restartWorker :: Worker m -> IO () stopWorker :: Worker m -> IO () -- | Send empty task and wait until worker run it syncTask :: (MonadCatch m, MonadIO m) => Worker m -> IO () -- | Run action in worker and wait for result inWorkerWith :: (MonadIO m, MonadCatch m, MonadIO n) => (SomeException -> n a) -> Worker m -> m a -> n a -- | Run action in worker and wait for result inWorker :: (MonadIO m, MonadCatch m) => Worker m -> m a -> IO a -- | Run action in worker and wait for result inWorker_ :: (MonadIO m, MonadCatch m) => Worker m -> m a -> ExceptT SomeException IO a instance GHC.Show.Show Control.Concurrent.Worker.WorkerStopped instance GHC.Exception.Exception Control.Concurrent.Worker.WorkerStopped module HsDev.Tools.Ghc.Worker data SessionTarget SessionGhci :: SessionTarget SessionGhc :: [String] -> SessionTarget type GhcM a = MGhcT SessionTarget (LogT IO) a type GhcWorker = Worker (MGhcT SessionTarget (LogT IO)) -- | Multi-session ghc monad newtype MGhcT s m a MGhcT :: GhcT (ReaderT (Maybe FilePath) (StateT (SessionState s) m)) a -> MGhcT s m a [unMGhcT] :: MGhcT s m a -> GhcT (ReaderT (Maybe FilePath) (StateT (SessionState s) m)) a runGhcM :: MonadLog m => Maybe FilePath -> GhcM a -> m a -- | Multi-session ghc worker ghcWorker :: MonadLog m => m GhcWorker -- | Create session with options workerSession :: SessionTarget -> GhcM () -- | Run ghc ghcRun :: GhcMonad m => [String] -> m a -> m a -- | Alter DynFlags temporary withFlags :: GhcMonad m => m a -> m a -- | Update DynFlags modifyFlags :: GhcMonad m => (DynFlags -> DynFlags) -> m () -- | Add options without reinit session addCmdOpts :: (MonadLog m, GhcMonad m) => [String] -> m () -- | Set options after session reinit setCmdOpts :: (MonadLog m, GhcMonad m) => [String] -> m () -- | Import some modules importModules :: GhcMonad m => [String] -> m () -- | Default interpreter modules preludeModules :: [String] -- | Evaluate expression evaluate :: GhcMonad m => String -> m String -- | Clear loaded targets clearTargets :: GhcMonad m => m () -- | Make target with its source code optional makeTarget :: GhcMonad m => String -> Maybe String -> m Target -- | Load all targets loadTargets :: GhcMonad m => [Target] -> m () -- | Get list of installed packages listPackages :: GhcMonad m => m [ModulePackage] -- | Get region of SrcSpan spanRegion :: SrcSpan -> Region -- | Set current directory and restore it after action withCurrentDirectory :: GhcMonad m => FilePath -> m a -> m a -- | Log ghc warnings and errors as to chan You may have to apply -- recalcTabs on result notes logToChan :: Chan (Note OutputMessage) -> LogAction -- | Don't log ghc warnings and errors logToNull :: LogAction -- | A minimal implementation of a GhcMonad. If you need a custom -- monad, e.g., to maintain additional state consider wrapping this monad -- or using GhcT. data Ghc a :: * -> * newtype LogT (m :: * -> *) a :: (* -> *) -> * -> * LogT :: ReaderT * Log m a -> LogT a [runLogT] :: LogT a -> ReaderT * Log m a instance GHC.Show.Show HsDev.Tools.Ghc.Worker.SessionTarget instance Text.Format.Formattable HsDev.Tools.Ghc.Worker.SessionTarget instance GHC.Classes.Eq HsDev.Tools.Ghc.Worker.SessionTarget instance GHC.Classes.Ord HsDev.Tools.Ghc.Worker.SessionTarget instance (GHC.Base.Monad m, GhcMonad.GhcMonad m) => GhcMonad.GhcMonad (Control.Monad.Trans.Reader.ReaderT r m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (System.Log.Simple.Monad.LogT m) instance Control.Monad.Catch.MonadThrow GhcMonad.Ghc module HsDev.Inspect -- | Analize source contents analyzeModule :: [String] -> Maybe FilePath -> String -> Either String Module -- | Extract files docs and set them to declarations inspectDocsChunk :: [String] -> [Module] -> IO [Module] -- | Extract file docs and set them to module declarations inspectDocs :: [String] -> Module -> IO Module -- | Like inspectDocs, but in Ghc monad inspectDocsGhc :: [String] -> Module -> Ghc Module -- | Inspect contents inspectContents :: String -> [(String, String)] -> [String] -> String -> ExceptT String IO InspectedModule contentsInspection :: String -> [String] -> ExceptT String IO Inspection -- | Inspect file inspectFile :: [(String, String)] -> [String] -> FilePath -> Maybe String -> IO InspectedModule -- | File inspection data fileInspection :: FilePath -> [String] -> IO Inspection -- | Enumerate project dirs projectDirs :: Project -> IO [Extensions FilePath] -- | Enumerate project source files projectSources :: Project -> IO [Extensions FilePath] -- | Inspect project inspectProject :: [(String, String)] -> [String] -> Project -> IO (Project, [InspectedModule]) -- | Get actual defines getDefines :: IO [(String, String)] preprocess :: [(String, String)] -> FilePath -> String -> IO String preprocess_ :: [(String, String)] -> [String] -> FilePath -> String -> IO String module HsDev.Scan.Browse -- | Browse packages browsePackages :: MonadLog m => [String] -> PackageDbStack -> m [PackageConfig] -- | Get packages with deps browsePackagesDeps :: MonadLog m => [String] -> PackageDbStack -> m (Deps PackageConfig) listModules :: MonadLog m => [String] -> PackageDbStack -> m [ModuleLocation] browseModules :: MonadLog m => [String] -> PackageDbStack -> [ModuleLocation] -> m [InspectedModule] -- | Browse modules, if third argument is True - browse only modules in top -- of package-db stack browse :: MonadLog m => [String] -> PackageDbStack -> m [InspectedModule] -- | Browse modules in top of package-db stack browseDb :: MonadLog m => [String] -> PackageDbStack -> m [InspectedModule] withPackages :: MonadLog m => [String] -> (DynFlags -> GhcM a) -> m a withPackages_ :: MonadLog m => [String] -> GhcM a -> m a readPackage :: PackageConfig -> ModulePackage readPackageConfig :: PackageConfig -> PackageConfig ghcPackageDb :: PackageConfig -> IO PackageDb ghcModuleLocation :: PackageDb -> PackageConfig -> Module -> ModuleLocation -- | Get package-db for package library directory Haskish way global-db - -- library is in pathlibpackage and there exists -- pathlibpackage.conf.d user-db - library is in cabal user -- directory package-db cabal-sandbox - library in -- ....cabal-sandbox...platform-ghc-verpackage -- then package-db is -- ....cabal-sandboxplatform-ghc-ver-package.conf.d stack -- (snapshots or .stack-work) - library in -- pathlibplatform-ghc-ver/package then -- package-db is path/pkgdb packageDbCandidate :: FilePath -> IO (Maybe PackageDb) -- | Use global as default packageDbCandidate_ :: FilePath -> IO PackageDb packageConfigs :: GhcM [PackageConfig] packageDbModules :: GhcM [(PackageConfig, Module)] lookupModule_ :: DynFlags -> ModuleName -> [Module] module HsDev.Stack -- | Invoke stack command, we are trying to get actual stack near current -- hsdev executable stack :: MonadLog m => [String] -> m String -- | Make yaml opts yaml :: Maybe FilePath -> [String] -- | Stack path path :: MonadLog m => Maybe FilePath -> m Paths -- | Get path for pathOf :: String -> Lens' Paths (Maybe FilePath) -- | Build stack project build :: MonadLog m => [String] -> Maybe FilePath -> m () -- | Build only dependencies buildDeps :: MonadLog m => Maybe FilePath -> m () -- | Configure project configure :: MonadLog m => Maybe FilePath -> m () data StackEnv StackEnv :: FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> StackEnv [_stackRoot] :: StackEnv -> FilePath [_stackProject] :: StackEnv -> FilePath [_stackConfig] :: StackEnv -> FilePath [_stackGhc] :: StackEnv -> FilePath [_stackSnapshot] :: StackEnv -> FilePath [_stackLocal] :: StackEnv -> FilePath stackRoot :: Lens' StackEnv FilePath stackProject :: Lens' StackEnv FilePath stackConfig :: Lens' StackEnv FilePath stackGhc :: Lens' StackEnv FilePath stackSnapshot :: Lens' StackEnv FilePath stackLocal :: Lens' StackEnv FilePath getStackEnv :: Paths -> Maybe StackEnv -- | Projects paths projectEnv :: MonadLog m => FilePath -> m StackEnv -- | Get package-db stack for stack environment stackPackageDbStack :: Lens' StackEnv PackageDbStack -- | Get compiler version stackCompiler :: MonadLog m => m String -- | Get arch for stack stackArch :: String -- | The parameterizable maybe monad, obtained by composing an arbitrary -- monad with the Maybe monad. -- -- Computations are actions that may produce a value or exit. -- -- The return function yields a computation that produces that -- value, while >>= sequences two subcomputations, exiting -- if either computation does. newtype MaybeT (m :: * -> *) a :: (* -> *) -> * -> * MaybeT :: m (Maybe a) -> MaybeT a [runMaybeT] :: MaybeT a -> m (Maybe a) module HsDev.Sandbox data SandboxType CabalSandbox :: SandboxType StackWork :: SandboxType data Sandbox Sandbox :: SandboxType -> FilePath -> Sandbox [_sandboxType] :: Sandbox -> SandboxType [_sandbox] :: Sandbox -> FilePath sandboxType :: Lens' Sandbox SandboxType sandbox :: Lens' Sandbox FilePath isSandbox :: FilePath -> Bool guessSandboxType :: FilePath -> Maybe SandboxType sandboxFromPath :: FilePath -> Maybe Sandbox -- | Find sandbox in path findSandbox :: FilePath -> IO (Maybe Sandbox) -- | Search sandbox by parent directory searchSandbox :: FilePath -> IO (Maybe Sandbox) -- | Get project sandbox: search up for .cabal, then search for stack.yaml -- in current directory and cabal sandbox in current + parents projectSandbox :: FilePath -> IO (Maybe Sandbox) -- | Get package-db stack for sandbox sandboxPackageDbStack :: MonadLog m => Sandbox -> m PackageDbStack -- | Search package-db stack with user-db as default searchPackageDbStack :: MonadLog m => FilePath -> m PackageDbStack -- | Restore package-db stack by package-db restorePackageDbStack :: MonadLog m => PackageDb -> m PackageDbStack -- | Get actual sandbox build path: -- arch-platform-compiler-version cabalSandboxLib :: MonadLog m => m FilePath -- | Get sandbox package-db: -- arch-platform-compiler-version-packages.conf.d cabalSandboxPackageDb :: MonadLog m => m FilePath -- | Options for GHC for module and project getModuleOpts :: MonadLog m => [String] -> Module -> m [String] instance Control.DeepSeq.NFData HsDev.Sandbox.SandboxType instance Control.DeepSeq.NFData HsDev.Sandbox.Sandbox instance GHC.Show.Show HsDev.Sandbox.Sandbox instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Sandbox.Sandbox instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Sandbox.Sandbox instance System.Directory.Paths.Paths HsDev.Sandbox.Sandbox instance GHC.Classes.Ord HsDev.Sandbox.Sandbox instance GHC.Classes.Eq HsDev.Sandbox.Sandbox instance GHC.Enum.Bounded HsDev.Sandbox.SandboxType instance GHC.Enum.Enum HsDev.Sandbox.SandboxType instance GHC.Show.Show HsDev.Sandbox.SandboxType instance GHC.Read.Read HsDev.Sandbox.SandboxType instance GHC.Classes.Ord HsDev.Sandbox.SandboxType instance GHC.Classes.Eq HsDev.Sandbox.SandboxType module HsDev.Display class Display a display :: Display a => a -> String displayType :: Display a => a -> String instance HsDev.Display.Display HsDev.PackageDb.PackageDb instance HsDev.Display.Display HsDev.Symbols.Location.ModuleLocation instance HsDev.Display.Display HsDev.Project.Types.Project instance HsDev.Display.Display HsDev.Sandbox.Sandbox instance HsDev.Display.Display GHC.IO.FilePath instance Text.Format.Formattable HsDev.PackageDb.PackageDb instance Text.Format.Formattable HsDev.Symbols.Location.ModuleLocation instance Text.Format.Formattable HsDev.Project.Types.Project module HsDev.Server.Types type ServerMonadBase m = (MonadIO m, MonadMask m, MonadBaseControl IO m, Alternative m, MonadPlus m) data SessionLog SessionLog :: Log -> IO [String] -> IO () -> SessionLog [sessionLogger] :: SessionLog -> Log [sessionListenLog] :: SessionLog -> IO [String] [sessionLogWait] :: SessionLog -> IO () data Session Session :: Async Database -> (Database -> ServerM IO ()) -> ((FilePath -> ExceptT String IO Structured) -> ServerM IO (Maybe Database)) -> SessionLog -> Watcher -> GhcWorker -> IO () -> IO () -> [(String, String)] -> Session [sessionDatabase] :: Session -> Async Database [sessionWriteCache] :: Session -> Database -> ServerM IO () [sessionReadCache] :: Session -> (FilePath -> ExceptT String IO Structured) -> ServerM IO (Maybe Database) [sessionLog] :: Session -> SessionLog [sessionWatcher] :: Session -> Watcher [sessionGhc] :: Session -> GhcWorker [sessionExit] :: Session -> IO () [sessionWait] :: Session -> IO () [sessionDefines] :: Session -> [(String, String)] class (ServerMonadBase m, MonadLog m) => SessionMonad m getSession :: SessionMonad m => m Session askSession :: SessionMonad m => (Session -> a) -> m a newtype ServerM m a ServerM :: ReaderT Session m a -> ServerM m a [runServerM] :: ServerM m a -> ReaderT Session m a data CommandOptions CommandOptions :: FilePath -> (Notification -> IO ()) -> IO () -> IO () -> CommandOptions [commandOptionsRoot] :: CommandOptions -> FilePath [commandOptionsNotify] :: CommandOptions -> Notification -> IO () [commandOptionsLink] :: CommandOptions -> IO () [commandOptionsHold] :: CommandOptions -> IO () class (SessionMonad m, MonadPlus m) => CommandMonad m getOptions :: CommandMonad m => m CommandOptions askOptions :: CommandMonad m => (CommandOptions -> a) -> m a newtype ClientM m a ClientM :: ServerM (ReaderT CommandOptions m) a -> ClientM m a [runClientM] :: ClientM m a -> ServerM (ReaderT CommandOptions m) a -- | Run action on session withSession :: Session -> ServerM m a -> m a -- | Listen server's log serverListen :: SessionMonad m => m [String] -- | Set server's log config serverSetLogLevel :: SessionMonad m => Level -> m Level -- | Wait for server serverWait :: SessionMonad m => m () -- | Update database serverUpdateDB :: SessionMonad m => Database -> m () -- | Server write cache serverWriteCache :: SessionMonad m => Database -> m () -- | Server read cache serverReadCache :: SessionMonad m => (FilePath -> ExceptT String IO Structured) -> m (Maybe Database) -- | In ghc session inSessionGhc :: SessionMonad m => GhcM a -> m a -- | Exit session serverExit :: SessionMonad m => m () commandRoot :: CommandMonad m => m FilePath commandNotify :: CommandMonad m => Notification -> m () commandLink :: CommandMonad m => m () commandHold :: CommandMonad m => m () -- | Server control command data ServerCommand Version :: ServerCommand Start :: ServerOpts -> ServerCommand Run :: ServerOpts -> ServerCommand Stop :: ClientOpts -> ServerCommand Connect :: ClientOpts -> ServerCommand Remote :: ClientOpts -> Bool -> Command -> ServerCommand data ConnectionPort NetworkPort :: Int -> ConnectionPort UnixPort :: String -> ConnectionPort -- | Server options data ServerOpts ServerOpts :: ConnectionPort -> Int -> Maybe FilePath -> String -> Maybe FilePath -> Bool -> Bool -> ServerOpts [serverPort] :: ServerOpts -> ConnectionPort [serverTimeout] :: ServerOpts -> Int [serverLog] :: ServerOpts -> Maybe FilePath [serverLogLevel] :: ServerOpts -> String [serverCache] :: ServerOpts -> Maybe FilePath [serverLoad] :: ServerOpts -> Bool [serverSilent] :: ServerOpts -> Bool -- | Silent server with no connection, useful for ghci silentOpts :: ServerOpts -- | Client options data ClientOpts ClientOpts :: ConnectionPort -> Bool -> Bool -> Int -> Bool -> ClientOpts [clientPort] :: ClientOpts -> ConnectionPort [clientPretty] :: ClientOpts -> Bool [clientStdin] :: ClientOpts -> Bool [clientTimeout] :: ClientOpts -> Int [clientSilent] :: ClientOpts -> Bool serverOptsArgs :: ServerOpts -> [String] data Request Request :: Command -> FilePath -> Bool -> Int -> Bool -> Request [requestCommand] :: Request -> Command [requestDirectory] :: Request -> FilePath [requestNoFile] :: Request -> Bool [requestTimeout] :: Request -> Int [requestSilent] :: Request -> Bool -- | Command from client data Command Ping :: Command Listen :: (Maybe String) -> Command SetLogLevel :: String -> Command AddData :: [AddedContents] -> Command [addedContents] :: Command -> [AddedContents] Scan :: [FilePath] -> Bool -> [FilePath] -> [FileSource] -> [FilePath] -> [String] -> Bool -> Bool -> Command [scanProjects] :: Command -> [FilePath] [scanCabal] :: Command -> Bool [scanSandboxes] :: Command -> [FilePath] [scanFiles] :: Command -> [FileSource] [scanPaths] :: Command -> [FilePath] [scanGhcOpts] :: Command -> [String] [scanDocs] :: Command -> Bool [scanInferTypes] :: Command -> Bool RefineDocs :: [FilePath] -> [FilePath] -> [String] -> Command [docsProjects] :: Command -> [FilePath] [docsFiles] :: Command -> [FilePath] [docsModules] :: Command -> [String] InferTypes :: [FilePath] -> [FilePath] -> [String] -> Command [inferProjects] :: Command -> [FilePath] [inferFiles] :: Command -> [FilePath] [inferModules] :: Command -> [String] Remove :: [FilePath] -> Bool -> [FilePath] -> [FilePath] -> Command [removeProjects] :: Command -> [FilePath] [removeCabal] :: Command -> Bool [removeSandboxes] :: Command -> [FilePath] [removeFiles] :: Command -> [FilePath] RemoveAll :: Command InfoModules :: [TargetFilter] -> Command InfoPackages :: Command InfoProjects :: Command InfoSandboxes :: Command InfoSymbol :: SearchQuery -> [TargetFilter] -> Bool -> Command InfoModule :: SearchQuery -> [TargetFilter] -> Command InfoResolve :: FilePath -> Bool -> Command InfoProject :: (Either String FilePath) -> Command InfoSandbox :: FilePath -> Command Lookup :: String -> FilePath -> Command Whois :: String -> FilePath -> Command ResolveScopeModules :: SearchQuery -> FilePath -> Command ResolveScope :: SearchQuery -> Bool -> FilePath -> Command Complete :: String -> Bool -> FilePath -> Command Hayoo :: String -> Int -> Int -> Command [hayooQuery] :: Command -> String [hayooPage] :: Command -> Int [hayooPages] :: Command -> Int CabalList :: [String] -> Command [cabalListPackages] :: Command -> [String] Lint :: [FileSource] -> Command [lintFiles] :: Command -> [FileSource] Check :: [FileSource] -> [String] -> Command [checkFiles] :: Command -> [FileSource] [checkGhcOpts] :: Command -> [String] CheckLint :: [FileSource] -> [String] -> Command [checkLintFiles] :: Command -> [FileSource] [checkLintGhcOpts] :: Command -> [String] Types :: [FileSource] -> [String] -> Command [typesFiles] :: Command -> [FileSource] [typesGhcOpts] :: Command -> [String] AutoFix :: AutoFixCommand -> Command [autoFixCommand] :: Command -> AutoFixCommand GhcEval :: [String] -> Maybe FileSource -> Command [ghcEvalExpressions] :: Command -> [String] [ghcEvalSource] :: Command -> Maybe FileSource Langs :: Command Flags :: Command Link :: Bool -> Command [linkHold] :: Command -> Bool Exit :: Command data AddedContents AddedDatabase :: Database -> AddedContents AddedModule :: InspectedModule -> AddedContents AddedProject :: Project -> AddedContents data AutoFixCommand AutoFixShow :: [Note OutputMessage] -> AutoFixCommand AutoFixFix :: [Note Correction] -> [Note Correction] -> Bool -> AutoFixCommand data FileSource FileSource :: FilePath -> Maybe String -> FileSource [fileSource] :: FileSource -> FilePath [fileContents] :: FileSource -> Maybe String data TargetFilter TargetProject :: String -> TargetFilter TargetFile :: FilePath -> TargetFilter TargetModule :: String -> TargetFilter TargetDepsOf :: String -> TargetFilter TargetPackageDb :: PackageDb -> TargetFilter TargetCabal :: TargetFilter TargetSandbox :: FilePath -> TargetFilter TargetPackage :: String -> TargetFilter TargetSourced :: TargetFilter TargetStandalone :: TargetFilter data SearchQuery SearchQuery :: String -> SearchType -> SearchQuery data SearchType SearchExact :: SearchType SearchPrefix :: SearchType SearchInfix :: SearchType SearchSuffix :: SearchType SearchRegex :: SearchType class FromCmd a cmdP :: FromCmd a => Parser a instance GHC.Show.Show HsDev.Server.Types.ServerCommand instance GHC.Show.Show HsDev.Server.Types.Request instance GHC.Show.Show HsDev.Server.Types.Command instance GHC.Show.Show HsDev.Server.Types.SearchQuery instance GHC.Show.Show HsDev.Server.Types.SearchType instance GHC.Show.Show HsDev.Server.Types.TargetFilter instance GHC.Classes.Eq HsDev.Server.Types.TargetFilter instance GHC.Show.Show HsDev.Server.Types.FileSource instance GHC.Show.Show HsDev.Server.Types.AutoFixCommand instance GHC.Show.Show HsDev.Server.Types.ClientOpts instance GHC.Show.Show HsDev.Server.Types.ServerOpts instance GHC.Read.Read HsDev.Server.Types.ConnectionPort instance GHC.Classes.Eq HsDev.Server.Types.ConnectionPort instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (HsDev.Server.Types.ClientM m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (HsDev.Server.Types.ClientM m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (HsDev.Server.Types.ClientM m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (HsDev.Server.Types.ClientM m) instance GHC.Base.MonadPlus m => GHC.Base.MonadPlus (HsDev.Server.Types.ClientM m) instance GHC.Base.Monad m => GHC.Base.Monad (HsDev.Server.Types.ClientM m) instance GHC.Base.Alternative m => GHC.Base.Alternative (HsDev.Server.Types.ClientM m) instance GHC.Base.Applicative m => GHC.Base.Applicative (HsDev.Server.Types.ClientM m) instance GHC.Base.Functor m => GHC.Base.Functor (HsDev.Server.Types.ClientM m) instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (HsDev.Server.Types.ServerM m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (HsDev.Server.Types.ServerM m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (HsDev.Server.Types.ServerM m) instance Control.Monad.Trans.Class.MonadTrans HsDev.Server.Types.ServerM instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader HsDev.Server.Types.Session (HsDev.Server.Types.ServerM m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (HsDev.Server.Types.ServerM m) instance GHC.Base.MonadPlus m => GHC.Base.MonadPlus (HsDev.Server.Types.ServerM m) instance GHC.Base.Monad m => GHC.Base.Monad (HsDev.Server.Types.ServerM m) instance GHC.Base.Alternative m => GHC.Base.Alternative (HsDev.Server.Types.ServerM m) instance GHC.Base.Applicative m => GHC.Base.Applicative (HsDev.Server.Types.ServerM m) instance GHC.Base.Functor m => GHC.Base.Functor (HsDev.Server.Types.ServerM m) instance (Control.Monad.IO.Class.MonadIO m, Control.Monad.Catch.MonadMask m) => System.Log.Simple.Monad.MonadLog (HsDev.Server.Types.ServerM m) instance HsDev.Server.Types.ServerMonadBase m => HsDev.Server.Types.SessionMonad (HsDev.Server.Types.ServerM m) instance Control.Monad.Base.MonadBase b m => Control.Monad.Base.MonadBase b (HsDev.Server.Types.ServerM m) instance Control.Monad.Trans.Control.MonadBaseControl b m => Control.Monad.Trans.Control.MonadBaseControl b (HsDev.Server.Types.ServerM m) instance Data.Default.Class.Default HsDev.Server.Types.CommandOptions instance Control.Monad.Trans.Class.MonadTrans HsDev.Server.Types.ClientM instance (Control.Monad.IO.Class.MonadIO m, Control.Monad.Catch.MonadMask m) => System.Log.Simple.Monad.MonadLog (HsDev.Server.Types.ClientM m) instance HsDev.Server.Types.ServerMonadBase m => HsDev.Server.Types.SessionMonad (HsDev.Server.Types.ClientM m) instance HsDev.Server.Types.ServerMonadBase m => HsDev.Server.Types.CommandMonad (HsDev.Server.Types.ClientM m) instance Control.Monad.Base.MonadBase b m => Control.Monad.Base.MonadBase b (HsDev.Server.Types.ClientM m) instance Control.Monad.Trans.Control.MonadBaseControl b m => Control.Monad.Trans.Control.MonadBaseControl b (HsDev.Server.Types.ClientM m) instance Data.Default.Class.Default HsDev.Server.Types.ConnectionPort instance GHC.Show.Show HsDev.Server.Types.ConnectionPort instance Text.Format.Formattable HsDev.Server.Types.ConnectionPort instance Data.Default.Class.Default HsDev.Server.Types.ServerOpts instance Data.Default.Class.Default HsDev.Server.Types.ClientOpts instance HsDev.Util.FromCmd HsDev.Server.Types.ServerCommand instance HsDev.Util.FromCmd HsDev.Server.Types.ServerOpts instance HsDev.Util.FromCmd HsDev.Server.Types.ClientOpts instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.Request instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.Request instance GHC.Show.Show HsDev.Server.Types.AddedContents instance System.Directory.Paths.Paths HsDev.Server.Types.Command instance System.Directory.Paths.Paths HsDev.Server.Types.FileSource instance System.Directory.Paths.Paths HsDev.Server.Types.TargetFilter instance System.Directory.Paths.Paths [HsDev.Server.Types.TargetFilter] instance HsDev.Util.FromCmd HsDev.Server.Types.Command instance HsDev.Util.FromCmd HsDev.Server.Types.AutoFixCommand instance HsDev.Util.FromCmd HsDev.Server.Types.FileSource instance HsDev.Util.FromCmd HsDev.Server.Types.TargetFilter instance HsDev.Util.FromCmd HsDev.Server.Types.SearchQuery instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.Command instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.Command instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.AddedContents instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.AddedContents instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.AutoFixCommand instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.AutoFixCommand instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.FileSource instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.FileSource instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.TargetFilter instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.TargetFilter instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.SearchQuery instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.SearchQuery instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.SearchType instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.SearchType module HsDev.Database.Update.Types data Status StatusWorking :: Status StatusOk :: Status StatusError :: HsDevError -> Status data Progress Progress :: Int -> Int -> Progress [progressCurrent] :: Progress -> Int [progressTotal] :: Progress -> Int data Task Task :: String -> Status -> String -> String -> Maybe Progress -> Task [_taskName] :: Task -> String [_taskStatus] :: Task -> Status [_taskSubjectType] :: Task -> String [_taskSubjectName] :: Task -> String [_taskProgress] :: Task -> Maybe Progress data UpdateOptions UpdateOptions :: [Task] -> [String] -> Bool -> Bool -> UpdateOptions [_updateTasks] :: UpdateOptions -> [Task] [_updateGhcOpts] :: UpdateOptions -> [String] [_updateDocs] :: UpdateOptions -> Bool [_updateInfer] :: UpdateOptions -> Bool newtype UpdateM m a UpdateM :: ReaderT UpdateOptions (WriterT [ModuleLocation] (ClientM m)) a -> UpdateM m a [runUpdateM] :: UpdateM m a -> ReaderT UpdateOptions (WriterT [ModuleLocation] (ClientM m)) a type UpdateMonad m = (CommandMonad m, MonadReader UpdateOptions m, MonadWriter [ModuleLocation] m) taskName :: Lens' Task String taskStatus :: Lens' Task Status taskSubjectType :: Lens' Task String taskSubjectName :: Lens' Task String taskProgress :: Lens' Task (Maybe Progress) updateTasks :: Lens' UpdateOptions [Task] updateGhcOpts :: Lens' UpdateOptions [String] updateDocs :: Lens' UpdateOptions Bool updateInfer :: Lens' UpdateOptions Bool instance GHC.Base.Monad m => Control.Monad.Writer.Class.MonadWriter [HsDev.Symbols.Location.ModuleLocation] (HsDev.Database.Update.Types.UpdateM m) instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader HsDev.Database.Update.Types.UpdateOptions (HsDev.Database.Update.Types.UpdateM m) instance GHC.Base.Functor m => GHC.Base.Functor (HsDev.Database.Update.Types.UpdateM m) instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (HsDev.Database.Update.Types.UpdateM m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (HsDev.Database.Update.Types.UpdateM m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (HsDev.Database.Update.Types.UpdateM m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (HsDev.Database.Update.Types.UpdateM m) instance GHC.Base.MonadPlus m => GHC.Base.MonadPlus (HsDev.Database.Update.Types.UpdateM m) instance GHC.Base.Monad m => GHC.Base.Monad (HsDev.Database.Update.Types.UpdateM m) instance GHC.Base.Alternative m => GHC.Base.Alternative (HsDev.Database.Update.Types.UpdateM m) instance GHC.Base.Applicative m => GHC.Base.Applicative (HsDev.Database.Update.Types.UpdateM m) instance Control.Monad.Trans.Class.MonadTrans HsDev.Database.Update.Types.UpdateM instance (Control.Monad.IO.Class.MonadIO m, Control.Monad.Catch.MonadMask m) => System.Log.Simple.Monad.MonadLog (HsDev.Database.Update.Types.UpdateM m) instance HsDev.Server.Types.ServerMonadBase m => HsDev.Server.Types.SessionMonad (HsDev.Database.Update.Types.UpdateM m) instance HsDev.Server.Types.ServerMonadBase m => HsDev.Server.Types.CommandMonad (HsDev.Database.Update.Types.UpdateM m) instance Control.Monad.Base.MonadBase b m => Control.Monad.Base.MonadBase b (HsDev.Database.Update.Types.UpdateM m) instance Control.Monad.Trans.Control.MonadBaseControl b m => Control.Monad.Trans.Control.MonadBaseControl b (HsDev.Database.Update.Types.UpdateM m) instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Database.Update.Types.Task instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Database.Update.Types.Task instance Data.Default.Class.Default HsDev.Database.Update.Types.UpdateOptions instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Database.Update.Types.Status instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Database.Update.Types.Status instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Database.Update.Types.Progress instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Database.Update.Types.Progress module HsDev.Scan -- | Compile flags type CompileFlag = String -- | Module with flags ready to scan type ModuleToScan = (ModuleLocation, [CompileFlag], Maybe String) -- | Project ready to scan type ProjectToScan = (Project, [ModuleToScan]) -- | Package-db sandbox to scan (top of stack) type PackageDbToScan = PackageDbStack -- | Scan info data ScanContents ScanContents :: [ModuleToScan] -> [ProjectToScan] -> [PackageDbStack] -> ScanContents [modulesToScan] :: ScanContents -> [ModuleToScan] [projectsToScan] :: ScanContents -> [ProjectToScan] [sandboxesToScan] :: ScanContents -> [PackageDbStack] class EnumContents a enumContents :: (EnumContents a, CommandMonad m) => a -> m ScanContents -- | Enum project sources enumProject :: CommandMonad m => Project -> m ScanContents -- | Enum sandbox enumSandbox :: CommandMonad m => Sandbox -> m ScanContents -- | Enum directory modules enumDirectory :: CommandMonad m => FilePath -> m ScanContents -- | Scan project file scanProjectFile :: CommandMonad m => [String] -> FilePath -> m Project -- | Scan module scanModule :: CommandMonad m => [(String, String)] -> [String] -> ModuleLocation -> Maybe String -> m InspectedModule -- | Scan additional info and modify scanned module scanModify :: CommandMonad m => ([String] -> PackageDbStack -> Module -> m Module) -> InspectedModule -> m InspectedModule -- | Is inspected module up to date? upToDate :: [String] -> InspectedModule -> IO Bool -- | Rescan inspected module rescanModule :: CommandMonad m => [(String, String)] -> [String] -> InspectedModule -> m (Maybe InspectedModule) -- | Is module new or recently changed changedModule :: Database -> [String] -> ModuleLocation -> IO Bool -- | Returns new (to scan) and changed (to rescan) modules changedModules :: Database -> [String] -> [ModuleToScan] -> IO [ModuleToScan] instance Control.DeepSeq.NFData HsDev.Scan.ScanContents instance GHC.Base.Monoid HsDev.Scan.ScanContents instance Text.Format.Formattable HsDev.Scan.ScanContents instance HsDev.Scan.EnumContents HsDev.Symbols.Location.ModuleLocation instance HsDev.Scan.EnumContents (HsDev.Project.Types.Extensions HsDev.Symbols.Location.ModuleLocation) instance HsDev.Scan.EnumContents HsDev.Project.Types.Project instance HsDev.Scan.EnumContents HsDev.PackageDb.PackageDbStack instance HsDev.Scan.EnumContents HsDev.Sandbox.Sandbox instance HsDev.Scan.EnumContents a => HsDev.Scan.EnumContents [a] instance HsDev.Scan.EnumContents GHC.IO.FilePath instance HsDev.Scan.EnumContents HsDev.Server.Types.FileSource module HsDev.Tools.Ghc.Check -- | Check files and collect warnings and errors checkFiles :: (MonadLog m, GhcMonad m) => [String] -> [FilePath] -> Maybe Project -> m [Note OutputMessage] -- | Check module source check :: (MonadLog m, GhcMonad m) => [String] -> Module -> Maybe String -> m [Note OutputMessage] -- | Check module and collect warnings and errors checkFile :: (MonadLog m, GhcMonad m) => [String] -> Module -> m [Note OutputMessage] -- | Check module and collect warnings and errors checkSource :: (MonadLog m, GhcMonad m) => [String] -> Module -> String -> m [Note OutputMessage] -- | A minimal implementation of a GhcMonad. If you need a custom -- monad, e.g., to maintain additional state consider wrapping this monad -- or using GhcT. data Ghc a :: * -> * data PackageDb GlobalDb :: PackageDb UserDb :: PackageDb PackageDb :: FilePath -> PackageDb [_packageDb] :: PackageDb -> FilePath -- | Stack of PackageDb in reverse order newtype PackageDbStack PackageDbStack :: [PackageDb] -> PackageDbStack [_packageDbStack] :: PackageDbStack -> [PackageDb] -- | Cabal project data Project Project :: String -> FilePath -> FilePath -> Maybe ProjectDescription -> Project [_projectName] :: Project -> String [_projectPath] :: Project -> FilePath [_projectCabal] :: Project -> FilePath [_projectDescription] :: Project -> Maybe ProjectDescription recalcNotesTabs :: [Note OutputMessage] -> IO [Note OutputMessage] module HsDev.Tools.Ghc.Session -- | Get ghc session ghcSession :: [String] -> GhcM () -- | Get ghci session ghciSession :: GhcM () -- | Get haddock session with flags haddockSession :: [String] -> GhcM () -- | Session for module targetSession :: [String] -> Module -> GhcM () -- | Interpret file interpretModule :: Module -> Maybe String -> GhcM () module HsDev.Tools.Ghc.Types data TypedExpr TypedExpr :: String -> String -> TypedExpr [_typedExpr] :: TypedExpr -> String [_typedType] :: TypedExpr -> String typedExpr :: Lens' TypedExpr String typedType :: Lens' TypedExpr String moduleTypes :: GhcMonad m => FilePath -> m [(SrcSpan, Type)] -- | Get all types in module fileTypes :: (MonadLog m, GhcMonad m) => [String] -> Module -> Maybe String -> m [Note TypedExpr] -- | Set types to module setModuleTypes :: [Note TypedExpr] -> Module -> Module -- | Infer types in module inferTypes :: (MonadLog m, GhcMonad m) => [String] -> Module -> Maybe String -> m Module instance Control.DeepSeq.NFData HsDev.Tools.Ghc.Types.TypedExpr instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Tools.Ghc.Types.TypedExpr instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Ghc.Types.TypedExpr instance GHC.Show.Show HsDev.Tools.Ghc.Types.TypedExpr instance GHC.Read.Read HsDev.Tools.Ghc.Types.TypedExpr instance GHC.Classes.Ord HsDev.Tools.Ghc.Types.TypedExpr instance GHC.Classes.Eq HsDev.Tools.Ghc.Types.TypedExpr instance HsDev.Tools.Ghc.Types.HasType (HsExpr.LHsExpr Var.Id) instance HsDev.Tools.Ghc.Types.HasType (HsBinds.LHsBind Var.Id) instance HsDev.Tools.Ghc.Types.HasType (HsPat.LPat Var.Id) module HsDev.Database.Update data Status StatusWorking :: Status StatusOk :: Status StatusError :: HsDevError -> Status data Progress Progress :: Int -> Int -> Progress [progressCurrent] :: Progress -> Int [progressTotal] :: Progress -> Int data Task Task :: String -> Status -> String -> String -> Maybe Progress -> Task [_taskName] :: Task -> String [_taskStatus] :: Task -> Status [_taskSubjectType] :: Task -> String [_taskSubjectName] :: Task -> String [_taskProgress] :: Task -> Maybe Progress isStatus :: Value -> Bool data UpdateOptions UpdateOptions :: [Task] -> [String] -> Bool -> Bool -> UpdateOptions [_updateTasks] :: UpdateOptions -> [Task] [_updateGhcOpts] :: UpdateOptions -> [String] [_updateDocs] :: UpdateOptions -> Bool [_updateInfer] :: UpdateOptions -> Bool newtype UpdateM m a UpdateM :: ReaderT UpdateOptions (WriterT [ModuleLocation] (ClientM m)) a -> UpdateM m a [runUpdateM] :: UpdateM m a -> ReaderT UpdateOptions (WriterT [ModuleLocation] (ClientM m)) a runUpdate :: ServerMonadBase m => UpdateOptions -> UpdateM m a -> ClientM m a -- | Post status postStatus :: UpdateMonad m => Task -> m () -- | Wait DB to complete actions waiter :: UpdateMonad m => m () -> m () -- | Update task result to database updater :: UpdateMonad m => Database -> m () -- | Get data from cache without updating DB loadCache :: UpdateMonad m => (FilePath -> ExceptT String IO Structured) -> m Database -- | Load data from cache if not loaded yet and wait getCache :: UpdateMonad m => (FilePath -> ExceptT String IO Structured) -> (Database -> Database) -> m Database -- | Run one task runTask :: (Display t, UpdateMonad m, NFData a) => String -> t -> m a -> m a -- | Run many tasks with numeration runTasks :: UpdateMonad m => [m ()] -> m () -- | Get database value readDB :: SessionMonad m => m Database -- | Scan module scanModule :: UpdateMonad m => [String] -> ModuleLocation -> Maybe String -> m () -- | Scan modules scanModules :: UpdateMonad m => [String] -> [ModuleToScan] -> m () -- | Scan source file scanFile :: UpdateMonad m => [String] -> FilePath -> m () -- | Scan source file with contents scanFileContents :: UpdateMonad m => [String] -> FilePath -> Maybe String -> m () -- | Scan cabal modules, doesn't rescan if already scanned scanCabal :: UpdateMonad m => [String] -> m () -- | Prepare sandbox for scanning. This is used for stack project to build -- & configure. prepareSandbox :: UpdateMonad m => Sandbox -> m () -- | Scan sandbox modules, doesn't rescan if already scanned scanSandbox :: UpdateMonad m => [String] -> Sandbox -> m () -- | Scan top of package-db stack, usable for rescan scanPackageDb :: UpdateMonad m => [String] -> PackageDbStack -> m () -- | Scan project file scanProjectFile :: UpdateMonad m => [String] -> FilePath -> m Project -- | Scan project and related package-db stack scanProjectStack :: UpdateMonad m => [String] -> FilePath -> m () -- | Scan project scanProject :: UpdateMonad m => [String] -> FilePath -> m () -- | Scan directory for source files and projects scanDirectory :: UpdateMonad m => [String] -> FilePath -> m () scanContents :: UpdateMonad m => [String] -> ScanContents -> m () -- | Scan docs for inspected modules scanDocs :: UpdateMonad m => [InspectedModule] -> m () inferModTypes :: UpdateMonad m => [InspectedModule] -> m () -- | Generic scan function. Reads cache only if data is not already loaded, -- removes obsolete modules and rescans changed modules. scan :: UpdateMonad m => (FilePath -> ExceptT String IO Structured) -> (Database -> Database) -> [ModuleToScan] -> [String] -> ([ModuleToScan] -> m ()) -> m () updateEvent :: ServerMonadBase m => Watched -> Event -> UpdateM m () processEvent :: UpdateOptions -> Watched -> Event -> ClientM IO () module HsDev.Client.Commands runClient :: (ToJSON a, ServerMonadBase m) => CommandOptions -> ClientM m a -> ServerM m Result runCommand :: ServerMonadBase m => Command -> ClientM m Value module HsDev.Server.Base -- | Inits log chan and returns functions (print message, wait channel) initLog :: ServerOpts -> IO SessionLog -- | Run server runServer :: ServerOpts -> ServerM IO () -> IO () type Server = Worker (ServerM IO) startServer :: ServerOpts -> IO Server inServer :: Server -> CommandOptions -> Command -> IO Result -- | Perform action on cache withCache :: Monad m => ServerOpts -> a -> (FilePath -> m a) -> m a writeCache :: SessionMonad m => ServerOpts -> Database -> m () readCache :: SessionMonad m => ServerOpts -> (FilePath -> ExceptT String IO Structured) -> m (Maybe Database) module HsDev.Server.Commands -- | Server control command data ServerCommand Version :: ServerCommand Start :: ServerOpts -> ServerCommand Run :: ServerOpts -> ServerCommand Stop :: ClientOpts -> ServerCommand Connect :: ClientOpts -> ServerCommand Remote :: ClientOpts -> Bool -> Command -> ServerCommand -- | Server options data ServerOpts ServerOpts :: ConnectionPort -> Int -> Maybe FilePath -> String -> Maybe FilePath -> Bool -> Bool -> ServerOpts [serverPort] :: ServerOpts -> ConnectionPort [serverTimeout] :: ServerOpts -> Int [serverLog] :: ServerOpts -> Maybe FilePath [serverLogLevel] :: ServerOpts -> String [serverCache] :: ServerOpts -> Maybe FilePath [serverLoad] :: ServerOpts -> Bool [serverSilent] :: ServerOpts -> Bool -- | Client options data ClientOpts ClientOpts :: ConnectionPort -> Bool -> Bool -> Int -> Bool -> ClientOpts [clientPort] :: ClientOpts -> ConnectionPort [clientPretty] :: ClientOpts -> Bool [clientStdin] :: ClientOpts -> Bool [clientTimeout] :: ClientOpts -> Int [clientSilent] :: ClientOpts -> Bool data Request Request :: Command -> FilePath -> Bool -> Int -> Bool -> Request [requestCommand] :: Request -> Command [requestDirectory] :: Request -> FilePath [requestNoFile] :: Request -> Bool [requestTimeout] :: Request -> Int [requestSilent] :: Request -> Bool type Msg a = (Bool, a) isLisp :: Lens' (Msg a) Bool msg :: Lens (Msg a) (Msg b) a b jsonMsg :: a -> Msg a lispMsg :: a -> Msg a encodeMessage :: ToJSON a => Msg (Message a) -> ByteString -- | Decode lisp or json request decodeMessage :: FromJSON a => ByteString -> Either (Msg String) (Msg (Message a)) sendCommand :: ClientOpts -> Bool -> Command -> (Notification -> IO a) -> IO Result runServerCommand :: ServerCommand -> IO () findPath :: MonadIO m => CommandOptions -> FilePath -> m FilePath -- | Process request, notifications can be sent during processing processRequest :: SessionMonad m => CommandOptions -> Command -> m Result -- | Process client, listen for requests and process them processClient :: SessionMonad m => String -> Chan ByteString -> (ByteString -> IO ()) -> m () -- | Process client by socket processClientSocket :: SessionMonad m => String -> Socket -> m () module HsDev module Control.Apply.Util (&) :: a -> (a -> b) -> b chain :: [a -> a] -> a -> a -- | Flipped version of chain, which can be used like this: -- --
--   foo `with` [f, g, h]
--   
with :: a -> [a -> a] -> a