-- 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.3.3.3 module Control.Apply.Util (&) :: a -> (a -> b) -> b chain :: [a -> a] -> a -> a module Control.Concurrent.FiniteChan -- | Chan is stoppable channel data Chan a newChan :: IO (Chan a) -- | Is channel opened openedChan :: Chan a -> IO Bool -- | Is channel closed closedChan :: Chan a -> IO Bool -- | Is channel closed and all data consumed doneChan :: Chan a -> IO Bool -- | Write data to channel if it is open sendChan :: Chan a -> a -> IO Bool -- | Get data from channel getChan :: Chan a -> IO (Maybe a) -- | Close channel closeChan :: Chan a -> IO () -- | Close channel and read all messages stopChan :: Chan a -> IO [a] module Control.Concurrent.Util fork :: MonadIO m => IO () -> m () timeout :: Int -> IO a -> IO (Maybe a) sync :: MonadIO m => (IO () -> m a) -> m a module Control.Concurrent.Worker data Worker m Worker :: Chan (Async (), m ()) -> MVar (Async ()) -> Worker m [workerChan] :: Worker m -> Chan (Async (), m ()) [workerTask] :: Worker m -> MVar (Async ()) data WorkerStopped WorkerStopped :: WorkerStopped -- | Create new worker startWorker :: MonadIO m => (m () -> IO ()) -> (m () -> m ()) -> (m () -> m ()) -> IO (Worker m) -- | Check whether worker alive workerAlive :: Worker m -> IO Bool workerDone :: Worker m -> IO Bool sendTask :: (MonadCatch m, MonadIO m) => Worker m -> m a -> IO (Async a) -- | Close worker channel stopWorker :: Worker m -> IO () -- | Stop worker and wait for it joinWorker :: 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 instance GHC.Show.Show Control.Concurrent.Worker.WorkerStopped instance GHC.Exception.Type.Exception Control.Concurrent.Worker.WorkerStopped module Data.Deps -- | Dependency map newtype 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 newtype DepsError a -- | Dependency cycle, list is cycle, where last item depends on first CyclicDeps :: [a] -> DepsError a -- | Flatten dependencies so that there will be no indirect dependencies flatten :: Ord a => Deps a -> Either (DepsError a) (Deps a) selfDepend :: Deps a -> Deps a -- | Linearize dependencies so that all items can be processed in this -- order, i.e. for each item all its dependencies goes before linearize :: Ord a => Deps a -> Either (DepsError a) [a] instance GHC.Read.Read a => GHC.Read.Read (Data.Deps.DepsError a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.Deps.DepsError a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Deps.DepsError a) instance GHC.Show.Show a => GHC.Show.Show (Data.Deps.DepsError a) instance GHC.Classes.Ord a => GHC.Base.Semigroup (Data.Deps.Deps a) instance GHC.Classes.Ord a => GHC.Base.Monoid (Data.Deps.Deps a) instance GHC.Show.Show a => GHC.Show.Show (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.Help class Help a brief :: Help a => a -> Text help :: Help a => a -> [Text] indent :: Text -> Text indentHelp :: [Text] -> [Text] detailed :: Help a => a -> [Text] indented :: Help a => a -> [Text] 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.LookupTable -- | k-v table type LookupTable k v = MVar (Map k v) newLookupTable :: (Ord k, MonadIO m) => m (LookupTable k v) -- | Lookup, or insert if not exists lookupTable :: (Ord k, MonadIO m) => k -> v -> LookupTable k v -> m v -- | Lookup, or insert if not exists lookupTableM :: (Ord k, MonadIO m) => k -> m v -> LookupTable k v -> m v -- | lookupTableM with swapped args cacheInTableM :: (Ord k, MonadIO m) => LookupTable k v -> k -> m v -> m v -- | Just check existable hasLookupTable :: (Ord k, MonadIO m) => k -> LookupTable k v -> m (Maybe v) -- | Make function caching results in LookupTable cachedInTable :: (Ord k, MonadIO m) => LookupTable k v -> (k -> m v) -> k -> m v -- | Insert value into table and return it insertTable :: (Ord k, MonadIO m) => k -> v -> LookupTable k v -> m v -- | Insert value into table and return it insertTableM :: (Ord k, MonadIO m) => k -> m v -> LookupTable k v -> m v -- | insertTable with flipped args storeInTable :: (Ord k, MonadIO m) => LookupTable k v -> k -> v -> m v -- | insertTable with flipped args storeInTableM :: (Ord k, MonadIO m) => LookupTable k v -> k -> m v -> m v module Data.Maybe.JustIf -- | Return Just if True justIf :: a -> Bool -> Maybe a -- | Calls function when value is Just whenJust :: Applicative m => Maybe a -> (a -> m b) -> m () -- | Calls function when monad returns Just whenJustM :: Monad m => m (Maybe a) -> (a -> m b) -> m () module HsDev.Database.SQLite.Schema.TH schemaExp :: ExpQ module HsDev.Database.SQLite.Schema schema :: Text commands :: [Query] module HsDev.Database.SQLite.Select data Select a Select :: [a] -> [a] -> [a] -> Select a [selectColumns] :: Select a -> [a] [selectTables] :: Select a -> [a] [selectConditions] :: Select a -> [a] select_ :: [a] -> Select a from_ :: [a] -> Select a where_ :: [a] -> Select a buildQuery :: Select Text -> String toQuery :: Select Text -> Query qSymbolId :: Select Text qSymbol :: Select Text qModuleLocation :: Text -> Select Text qModuleId :: Select Text qImport :: Text -> Select Text qBuildInfo :: Select Text -- | Symbol from haskell-names qNSymbol :: Text -> Text -> Select Text qNote :: Text -> Text -> Select Text instance Data.Traversable.Traversable HsDev.Database.SQLite.Select.Select instance Data.Foldable.Foldable HsDev.Database.SQLite.Select.Select instance GHC.Base.Functor HsDev.Database.SQLite.Select.Select instance GHC.Show.Show a => GHC.Show.Show (HsDev.Database.SQLite.Select.Select a) instance GHC.Read.Read a => GHC.Read.Read (HsDev.Database.SQLite.Select.Select a) instance GHC.Classes.Ord a => GHC.Classes.Ord (HsDev.Database.SQLite.Select.Select a) instance GHC.Classes.Eq a => GHC.Classes.Eq (HsDev.Database.SQLite.Select.Select a) instance GHC.Base.Semigroup (HsDev.Database.SQLite.Select.Select a) instance GHC.Base.Monoid (HsDev.Database.SQLite.Select.Select a) module HsDev.Project.Compat showVer :: Version -> String componentName :: UnqualComponentName -> Text testSuiteEnabled :: TestSuite -> Bool flattenCondTree :: Monoid a => (c -> a -> a) -> CondTree v c a -> a parsePackageDesc :: String -> Either String GenericPackageDescription module HsDev.Server.Message.Lisp 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 -- | Decode lisp or json decodeMsg :: FromJSON a => ByteString -> Either (Msg String) (Msg a) -- | Encode lisp or json encodeMsg :: ToJSON a => Msg a -> ByteString module HsDev.Symbols.Name -- | Qualified name type Name = QName () qualName :: String -> String -> Name unqualName :: String -> Name nameModule :: Name -> Maybe Text nameIdent :: Name -> Text pattern Name :: Maybe Text -> Text -> Name fromName_ :: Name () -> Text toName_ :: Text -> Name () toModuleName_ :: Text -> ModuleName () fromModuleName_ :: ModuleName () -> Text fromName :: Name -> Text toName :: Text -> Name name_ :: Iso' (Name ()) Text moduleName_ :: Iso' (ModuleName ()) Text module HsDev.Tools.Ghc.Compat pkgDatabase :: DynFlags -> Maybe [PackageConfig] type TcId = GhcTc type UnitId = UnitId type InstalledUnitId = InstalledUnitId 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 addLogAction :: LogAction -> DynFlags -> DynFlags languages :: [String] flags :: [String] recSelParent :: RecSelParent -> String recSelCtors :: RecSelParent -> [String] getFixity :: Fixity -> (Int, FixityDirection) unqualStyle :: DynFlags -> PprStyle exposedModuleName :: (a, Maybe b) -> a exprType :: GhcMonad m => String -> m Type modSummaries :: ModuleGraph -> [ModSummary] cleanTemps :: DynFlags -> IO () mgArgTys :: MatchGroup TcId (LHsExpr TcId) -> Maybe [Type] mgResTy :: MatchGroup TcId (LHsExpr TcId) -> Maybe Type module HsDev.Tools.Ghc.MGhc data Session s d Session :: s -> d -> Session s d [_sessionKey] :: Session s d -> s [_sessionData] :: Session s d -> d sessionKey :: Lens' (Session s d) s sessionData :: Lens' (Session s d) d data SessionState s d SessionState :: Maybe (Session s d) -> Map s (HscEnv, d) -> SessionState s d [_sessionActive] :: SessionState s d -> Maybe (Session s d) [_sessionMap] :: SessionState s d -> Map s (HscEnv, d) sessionActive :: Lens' (SessionState s d) (Maybe (Session s d)) sessionMap :: Lens' (SessionState s d) (Map s (HscEnv, d)) -- | Multi-session ghc monad newtype MGhcT s d m a MGhcT :: GhcT (ReaderT (Maybe FilePath) (StateT (SessionState s d) m)) a -> MGhcT s d m a [unMGhcT] :: MGhcT s d m a -> GhcT (ReaderT (Maybe FilePath) (StateT (SessionState s d) m)) a -- | Run multi-session ghc runMGhcT :: (MonadIO m, ExceptionMonad m, Ord s, Monoid d) => Maybe FilePath -> MGhcT s d m a -> m a -- | Lift Ghc monad onto MGhc liftGhc :: MonadIO m => Ghc a -> MGhcT s d m a -- | Get current session currentSession :: MonadIO m => MGhcT s d m (Maybe (Session s d)) -- | Get current session data getSessionData :: MonadIO m => MGhcT s d m (Maybe d) -- | Set current session data setSessionData :: MonadIO m => d -> MGhcT s d m () -- | Does session exist hasSession :: (MonadIO m, Ord s) => s -> MGhcT s d m Bool -- | Find session findSession :: (MonadIO m, Ord s) => s -> MGhcT s d m (Maybe (Session s d)) -- | Find session by findSessionBy :: MonadIO m => (s -> Bool) -> MGhcT s d m [Session s d] -- | Save current session saveSession :: (MonadIO m, ExceptionMonad m, Ord s) => MGhcT s d m (Maybe (Session s d)) -- | Initialize new session initSession :: (MonadIO m, ExceptionMonad m, Ord s) => MGhcT s d m () -- | Create new named session, deleting existing session newSession :: (MonadIO m, ExceptionMonad m, Ord s, Monoid d) => s -> MGhcT s d m () -- | Switch to session, creating if not exist, returns True if session was -- created switchSession :: (MonadIO m, ExceptionMonad m, Ord s, Monoid d) => s -> MGhcT s d m Bool -- | Switch to session, creating if not exist and initializing with passed -- function switchSession_ :: (MonadIO m, ExceptionMonad m, Ord s, Monoid d) => s -> Maybe (MGhcT s d m ()) -> MGhcT s d m () -- | Delete existing session deleteSession :: (MonadIO m, ExceptionMonad m, Ord s, Monoid d) => s -> MGhcT s d m () -- | Save and restore session restoreSession :: (MonadIO m, MonadMask m, ExceptionMonad m, Ord s, Monoid d) => MGhcT s d m a -> MGhcT s d m a -- | Run action using session, restoring session back usingSession :: (MonadIO m, MonadMask m, ExceptionMonad m, Ord s, Monoid d) => s -> MGhcT s d m a -> MGhcT s d m a -- | Run with temporary session, like usingSession, but deletes -- self session tempSession :: (MonadIO m, MonadMask m, ExceptionMonad m, Ord s, Monoid d) => s -> MGhcT s d m a -> MGhcT s d m a instance System.Log.Simple.Monad.MonadLog m => System.Log.Simple.Monad.MonadLog (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader (GHC.Maybe.Maybe GHC.IO.FilePath) (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState (HsDev.Tools.Ghc.MGhc.SessionState s d) (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance Exception.ExceptionMonad m => GhcMonad.GhcMonad (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance Control.Monad.IO.Class.MonadIO m => DynFlags.HasDynFlags (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance Exception.ExceptionMonad m => Exception.ExceptionMonad (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance Control.Monad.Fail.MonadFail m => Control.Monad.Fail.MonadFail (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance GHC.Base.Monad m => GHC.Base.Monad (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance GHC.Base.Monad m => GHC.Base.Applicative (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance GHC.Base.Functor m => GHC.Base.Functor (HsDev.Tools.Ghc.MGhc.MGhcT s d m) instance (GHC.Show.Show s, GHC.Show.Show d) => GHC.Show.Show (HsDev.Tools.Ghc.MGhc.Session s d) instance (GHC.Read.Read s, GHC.Read.Read d) => GHC.Read.Read (HsDev.Tools.Ghc.MGhc.Session s d) instance (GHC.Classes.Ord s, GHC.Classes.Ord d) => GHC.Classes.Ord (HsDev.Tools.Ghc.MGhc.Session s d) instance (GHC.Classes.Eq s, GHC.Classes.Eq d) => GHC.Classes.Eq (HsDev.Tools.Ghc.MGhc.Session s d) instance Data.Default.Class.Default (HsDev.Tools.Ghc.MGhc.SessionState s d) 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.Fail.MonadFail m => Control.Monad.Fail.MonadFail (GhcMonad.GhcT m) 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.Prelude -- | Reduce list to one element reduce :: ([a] -> a) -> [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 -- | Append two lists, i.e., -- --
--   [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
--   [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
--   
-- -- If the first list is not finite, the result is the first list. (++) :: () => [a] -> [a] -> [a] infixr 5 ++ -- | filter, applied to a predicate and a list, returns the list of -- those elements that satisfy the predicate; i.e., -- --
--   filter p xs = [ x | x <- xs, p x]
--   
filter :: () => (a -> Bool) -> [a] -> [a] -- | zip takes two lists and returns a list of corresponding pairs. -- --
--   zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]
--   
-- -- If one input list is short, excess elements of the longer list are -- discarded: -- --
--   zip [1] ['a', 'b'] = [(1, 'a')]
--   zip [1, 2] ['a'] = [(1, 'a')]
--   
-- -- zip is right-lazy: -- --
--   zip [] _|_ = []
--   zip _|_ [] = _|_
--   
zip :: () => [a] -> [b] -> [(a, b)] -- | map f xs is the list obtained by applying f -- to each element of xs, i.e., -- --
--   map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
--   map f [x1, x2, ...] == [f x1, f x2, ...]
--   
map :: () => (a -> b) -> [a] -> [b] -- | The product function computes the product of the numbers of a -- structure. product :: (Foldable t, Num a) => t a -> a -- | The sum function computes the sum of the numbers of a -- structure. sum :: (Foldable t, Num a) => t a -> a -- | The least element of a non-empty structure. minimum :: (Foldable t, Ord a) => t a -> a -- | The largest element of a non-empty structure. maximum :: (Foldable t, Ord a) => t a -> a -- | Does the element occur in the structure? elem :: (Foldable t, Eq a) => a -> t a -> Bool infix 4 `elem` -- | Returns the size/length of a finite structure as an Int. The -- default implementation is optimized for structures that are similar to -- cons-lists, because there is no general way to do better. length :: Foldable t => t a -> Int -- | Test whether the structure is empty. The default implementation is -- optimized for structures that are similar to cons-lists, because there -- is no general way to do better. null :: Foldable t => t a -> Bool -- | A variant of foldl that has no base case, and thus may only be -- applied to non-empty structures. -- --
--   foldl1 f = foldl1 f . toList
--   
foldl1 :: Foldable t => (a -> a -> a) -> t a -> a -- | A variant of foldr that has no base case, and thus may only be -- applied to non-empty structures. -- --
--   foldr1 f = foldr1 f . toList
--   
foldr1 :: Foldable t => (a -> a -> a) -> t a -> a -- | Left-associative fold of a structure but with strict application of -- the operator. -- -- This ensures that each step of the fold is forced to weak head normal -- form before being applied, avoiding the collection of thunks that -- would otherwise occur. This is often what you want to strictly reduce -- a finite list to a single, monolithic result (e.g. length). -- -- For a general Foldable structure this should be semantically -- identical to, -- --
--   foldl f z = foldl' f z . toList
--   
foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b -- | Left-associative fold of a structure. -- -- In the case of lists, foldl, when applied to a binary operator, -- a starting value (typically the left-identity of the operator), and a -- list, reduces the list using the binary operator, from left to right: -- --
--   foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn
--   
-- -- Note that to produce the outermost application of the operator the -- entire input list must be traversed. This means that foldl' -- will diverge if given an infinite list. -- -- Also note that if you want an efficient left-fold, you probably want -- to use foldl' instead of foldl. The reason for this is -- that latter does not force the "inner" results (e.g. z f -- x1 in the above example) before applying them to the operator -- (e.g. to (f x2)). This results in a thunk chain -- O(n) elements long, which then must be evaluated from the -- outside-in. -- -- For a general Foldable structure this should be semantically -- identical to, -- --
--   foldl f z = foldl f z . toList
--   
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b -- | Right-associative fold of a structure. -- -- In the case of lists, foldr, when applied to a binary operator, -- a starting value (typically the right-identity of the operator), and a -- list, reduces the list using the binary operator, from right to left: -- --
--   foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)
--   
-- -- Note that, since the head of the resulting expression is produced by -- an application of the operator to the first element of the list, -- foldr can produce a terminating expression from an infinite -- list. -- -- For a general Foldable structure this should be semantically -- identical to, -- --
--   foldr f z = foldr f z . toList
--   
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b -- | Extract the first element of a list, which must be non-empty. head :: () => [a] -> a -- | Extract the elements after the head of a list, which must be -- non-empty. tail :: () => [a] -> [a] -- | Extract the last element of a list, which must be finite and -- non-empty. last :: () => [a] -> a -- | Return all the elements of a list except the last one. The list must -- be non-empty. init :: () => [a] -> [a] -- | scanl is similar to foldl, but returns a list of -- successive reduced values from the left: -- --
--   scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]
--   
-- -- Note that -- --
--   last (scanl f z xs) == foldl f z xs.
--   
scanl :: () => (b -> a -> b) -> b -> [a] -> [b] -- | scanl1 is a variant of scanl that has no starting value -- argument: -- --
--   scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]
--   
scanl1 :: () => (a -> a -> a) -> [a] -> [a] -- | scanr is the right-to-left dual of scanl. Note that -- --
--   head (scanr f z xs) == foldr f z xs.
--   
scanr :: () => (a -> b -> b) -> b -> [a] -> [b] -- | scanr1 is a variant of scanr that has no starting value -- argument. scanr1 :: () => (a -> a -> a) -> [a] -> [a] -- | iterate f x returns an infinite list of repeated -- applications of f to x: -- --
--   iterate f x == [x, f x, f (f x), ...]
--   
-- -- Note that iterate is lazy, potentially leading to thunk -- build-up if the consumer doesn't force each iterate. See 'iterate\'' -- for a strict variant of this function. iterate :: () => (a -> a) -> a -> [a] -- | repeat x is an infinite list, with x the -- value of every element. repeat :: () => a -> [a] -- | replicate n x is a list of length n with -- x the value of every element. It is an instance of the more -- general genericReplicate, in which n may be of any -- integral type. replicate :: () => Int -> a -> [a] -- | cycle ties a finite list into a circular one, or equivalently, -- the infinite repetition of the original list. It is the identity on -- infinite lists. cycle :: () => [a] -> [a] -- | takeWhile, applied to a predicate p and a list -- xs, returns the longest prefix (possibly empty) of -- xs of elements that satisfy p: -- --
--   takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2]
--   takeWhile (< 9) [1,2,3] == [1,2,3]
--   takeWhile (< 0) [1,2,3] == []
--   
takeWhile :: () => (a -> Bool) -> [a] -> [a] -- | dropWhile p xs returns the suffix remaining after -- takeWhile p xs: -- --
--   dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3]
--   dropWhile (< 9) [1,2,3] == []
--   dropWhile (< 0) [1,2,3] == [1,2,3]
--   
dropWhile :: () => (a -> Bool) -> [a] -> [a] -- | take n, applied to a list xs, returns the -- prefix of xs of length n, or xs itself if -- n > length xs: -- --
--   take 5 "Hello World!" == "Hello"
--   take 3 [1,2,3,4,5] == [1,2,3]
--   take 3 [1,2] == [1,2]
--   take 3 [] == []
--   take (-1) [1,2] == []
--   take 0 [1,2] == []
--   
-- -- It is an instance of the more general genericTake, in which -- n may be of any integral type. take :: () => Int -> [a] -> [a] -- | drop n xs returns the suffix of xs after the -- first n elements, or [] if n > length -- xs: -- --
--   drop 6 "Hello World!" == "World!"
--   drop 3 [1,2,3,4,5] == [4,5]
--   drop 3 [1,2] == []
--   drop 3 [] == []
--   drop (-1) [1,2] == [1,2]
--   drop 0 [1,2] == [1,2]
--   
-- -- It is an instance of the more general genericDrop, in which -- n may be of any integral type. drop :: () => Int -> [a] -> [a] -- | splitAt n xs returns a tuple where first element is -- xs prefix of length n and second element is the -- remainder of the list: -- --
--   splitAt 6 "Hello World!" == ("Hello ","World!")
--   splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5])
--   splitAt 1 [1,2,3] == ([1],[2,3])
--   splitAt 3 [1,2,3] == ([1,2,3],[])
--   splitAt 4 [1,2,3] == ([1,2,3],[])
--   splitAt 0 [1,2,3] == ([],[1,2,3])
--   splitAt (-1) [1,2,3] == ([],[1,2,3])
--   
-- -- It is equivalent to (take n xs, drop n xs) when -- n is not _|_ (splitAt _|_ xs = _|_). -- splitAt is an instance of the more general -- genericSplitAt, in which n may be of any integral -- type. splitAt :: () => Int -> [a] -> ([a], [a]) -- | span, applied to a predicate p and a list xs, -- returns a tuple where first element is longest prefix (possibly empty) -- of xs of elements that satisfy p and second element -- is the remainder of the list: -- --
--   span (< 3) [1,2,3,4,1,2,3,4] == ([1,2],[3,4,1,2,3,4])
--   span (< 9) [1,2,3] == ([1,2,3],[])
--   span (< 0) [1,2,3] == ([],[1,2,3])
--   
-- -- span p xs is equivalent to (takeWhile p xs, -- dropWhile p xs) span :: () => (a -> Bool) -> [a] -> ([a], [a]) -- | break, applied to a predicate p and a list -- xs, returns a tuple where first element is longest prefix -- (possibly empty) of xs of elements that do not satisfy -- p and second element is the remainder of the list: -- --
--   break (> 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4])
--   break (< 9) [1,2,3] == ([],[1,2,3])
--   break (> 9) [1,2,3] == ([1,2,3],[])
--   
-- -- break p is equivalent to span (not . -- p). break :: () => (a -> Bool) -> [a] -> ([a], [a]) -- | reverse xs returns the elements of xs in -- reverse order. xs must be finite. reverse :: () => [a] -> [a] -- | lookup key assocs looks up a key in an association -- list. lookup :: Eq a => a -> [(a, b)] -> Maybe b -- | List index (subscript) operator, starting from 0. It is an instance of -- the more general genericIndex, which takes an index of any -- integral type. (!!) :: () => [a] -> Int -> a infixl 9 !! -- | zip3 takes three lists and returns a list of triples, analogous -- to zip. zip3 :: () => [a] -> [b] -> [c] -> [(a, b, c)] -- | zipWith generalises zip by zipping with the function -- given as the first argument, instead of a tupling function. For -- example, zipWith (+) is applied to two lists to -- produce the list of corresponding sums. -- -- zipWith is right-lazy: -- --
--   zipWith f [] _|_ = []
--   
zipWith :: () => (a -> b -> c) -> [a] -> [b] -> [c] -- | The zipWith3 function takes a function which combines three -- elements, as well as three lists and returns a list of their -- point-wise combination, analogous to zipWith. zipWith3 :: () => (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] -- | unzip transforms a list of pairs into a list of first -- components and a list of second components. unzip :: () => [(a, b)] -> ([a], [b]) -- | The unzip3 function takes a list of triples and returns three -- lists, analogous to unzip. unzip3 :: () => [(a, b, c)] -> ([a], [b], [c]) -- | The isPrefixOf function takes two lists and returns True -- iff the first list is a prefix of the second. -- --
--   >>> "Hello" `isPrefixOf` "Hello World!"
--   True
--   
-- --
--   >>> "Hello" `isPrefixOf` "Wello Horld!"
--   False
--   
isPrefixOf :: Eq a => [a] -> [a] -> Bool -- | The isSuffixOf function takes two lists and returns True -- iff the first list is a suffix of the second. The second list must be -- finite. -- --
--   >>> "ld!" `isSuffixOf` "Hello World!"
--   True
--   
-- --
--   >>> "World" `isSuffixOf` "Hello World!"
--   False
--   
isSuffixOf :: Eq a => [a] -> [a] -> Bool -- | The isInfixOf function takes two lists and returns True -- iff the first list is contained, wholly and intact, anywhere within -- the second. -- --
--   >>> isInfixOf "Haskell" "I really like Haskell."
--   True
--   
-- --
--   >>> isInfixOf "Ial" "I really like Haskell."
--   False
--   
isInfixOf :: Eq a => [a] -> [a] -> Bool -- | O(n^2). The nub function removes duplicate elements from -- a list. In particular, it keeps only the first occurrence of each -- element. (The name nub means `essence'.) It is a special case -- of nubBy, which allows the programmer to supply their own -- equality test. -- --
--   >>> nub [1,2,3,4,3,2,1,2,4,3,5]
--   [1,2,3,4,5]
--   
nub :: Eq a => [a] -> [a] -- | The nubBy function behaves just like nub, except it uses -- a user-supplied equality predicate instead of the overloaded == -- function. -- --
--   >>> nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6]
--   [1,2,6]
--   
nubBy :: () => (a -> a -> Bool) -> [a] -> [a] -- | The intersperse function takes an element and a list and -- `intersperses' that element between the elements of the list. For -- example, -- --
--   >>> intersperse ',' "abcde"
--   "a,b,c,d,e"
--   
intersperse :: () => a -> [a] -> [a] -- | intercalate xs xss is equivalent to (concat -- (intersperse xs xss)). It inserts the list xs in -- between the lists in xss and concatenates the result. -- --
--   >>> intercalate ", " ["Lorem", "ipsum", "dolor"]
--   "Lorem, ipsum, dolor"
--   
intercalate :: () => [a] -> [[a]] -> [a] -- | The sort function implements a stable sorting algorithm. It is -- a special case of sortBy, which allows the programmer to supply -- their own comparison function. -- -- Elements are arranged from from lowest to highest, keeping duplicates -- in the order they appeared in the input. -- --
--   >>> sort [1,6,4,3,2,5]
--   [1,2,3,4,5,6]
--   
sort :: Ord a => [a] -> [a] -- | The sortBy function is the non-overloaded version of -- sort. -- --
--   >>> sortBy (\(a,_) (b,_) -> compare a b) [(2, "world"), (4, "!"), (1, "Hello")]
--   [(1,"Hello"),(2,"world"),(4,"!")]
--   
sortBy :: () => (a -> a -> Ordering) -> [a] -> [a] -- | The unfoldr function is a `dual' to foldr: while -- foldr reduces a list to a summary value, unfoldr builds -- a list from a seed value. The function takes the element and returns -- Nothing if it is done producing the list or returns Just -- (a,b), in which case, a is a prepended to the list -- and b is used as the next element in a recursive call. For -- example, -- --
--   iterate f == unfoldr (\x -> Just (x, f x))
--   
-- -- In some cases, unfoldr can undo a foldr operation: -- --
--   unfoldr f' (foldr f z xs) == xs
--   
-- -- if the following holds: -- --
--   f' (f x y) = Just (x,y)
--   f' z       = Nothing
--   
-- -- A simple use of unfoldr: -- --
--   >>> unfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10
--   [10,9,8,7,6,5,4,3,2,1]
--   
unfoldr :: () => (b -> Maybe (a, b)) -> b -> [a] -- | lines breaks a string up into a list of strings at newline -- characters. The resulting strings do not contain newlines. -- -- Note that after splitting the string at newline characters, the last -- part of the string is considered a line even if it doesn't end with a -- newline. For example, -- --
--   >>> lines ""
--   []
--   
-- --
--   >>> lines "\n"
--   [""]
--   
-- --
--   >>> lines "one"
--   ["one"]
--   
-- --
--   >>> lines "one\n"
--   ["one"]
--   
-- --
--   >>> lines "one\n\n"
--   ["one",""]
--   
-- --
--   >>> lines "one\ntwo"
--   ["one","two"]
--   
-- --
--   >>> lines "one\ntwo\n"
--   ["one","two"]
--   
-- -- Thus lines s contains at least as many elements as -- newlines in s. lines :: String -> [String] -- | unlines is an inverse operation to lines. It joins -- lines, after appending a terminating newline to each. -- --
--   >>> unlines ["Hello", "World", "!"]
--   "Hello\nWorld\n!\n"
--   
unlines :: [String] -> String -- | words breaks a string up into a list of words, which were -- delimited by white space. -- --
--   >>> words "Lorem ipsum\ndolor"
--   ["Lorem","ipsum","dolor"]
--   
words :: String -> [String] -- | unwords is an inverse operation to words. It joins words -- with separating spaces. -- --
--   >>> unwords ["Lorem", "ipsum", "dolor"]
--   "Lorem ipsum dolor"
--   
unwords :: [String] -> String -- | The concatenation of all the elements of a container of lists. concat :: Foldable t => t [a] -> [a] -- | Map a function over all the elements of a container and concatenate -- the resulting lists. concatMap :: Foldable t => (a -> [b]) -> t a -> [b] -- | and returns the conjunction of a container of Bools. For the -- result to be True, the container must be finite; False, -- however, results from a False value finitely far from the left -- end. and :: Foldable t => t Bool -> Bool -- | or returns the disjunction of a container of Bools. For the -- result to be False, the container must be finite; True, -- however, results from a True value finitely far from the left -- end. or :: Foldable t => t Bool -> Bool -- | Determines whether any element of the structure satisfies the -- predicate. any :: Foldable t => (a -> Bool) -> t a -> Bool -- | Determines whether all elements of the structure satisfy the -- predicate. all :: Foldable t => (a -> Bool) -> t a -> Bool -- | notElem is the negation of elem. notElem :: (Foldable t, Eq a) => a -> t a -> Bool infix 4 `notElem` -- | The find function takes a predicate and a structure and returns -- the leftmost element of the structure matching the predicate, or -- Nothing if there is no such element. find :: Foldable t => (a -> Bool) -> t a -> Maybe a -- | The isSubsequenceOf function takes two lists and returns -- True if all the elements of the first list occur, in order, in -- the second. The elements do not have to occur consecutively. -- -- isSubsequenceOf x y is equivalent to elem x -- (subsequences y). -- --

Examples

-- --
--   >>> isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
--   True
--   
--   >>> isSubsequenceOf ['a','d'..'z'] ['a'..'z']
--   True
--   
--   >>> isSubsequenceOf [1..10] [10,9..0]
--   False
--   
isSubsequenceOf :: Eq a => [a] -> [a] -> Bool -- | The mapAccumR function behaves like a combination of -- fmap and foldr; it applies a function to each element -- of a structure, passing an accumulating parameter from right to left, -- and returning a final value of this accumulator together with the new -- structure. mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) -- | The mapAccumL function behaves like a combination of -- fmap and foldl; it applies a function to each element -- of a structure, passing an accumulating parameter from left to right, -- and returning a final value of this accumulator together with the new -- structure. mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) -- | The least element of a non-empty structure with respect to the given -- comparison function. minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a -- | The largest element of a non-empty structure with respect to the given -- comparison function. maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a -- | Sort a list by comparing the results of a key function applied to each -- element. sortOn f is equivalent to sortBy (comparing -- f), but has the performance advantage of only evaluating -- f once for each element in the input list. This is called the -- decorate-sort-undecorate paradigm, or Schwartzian transform. -- -- Elements are arranged from from lowest to highest, keeping duplicates -- in the order they appeared in the input. -- --
--   >>> sortOn fst [(2, "world"), (4, "!"), (1, "Hello")]
--   [(1,"Hello"),(2,"world"),(4,"!")]
--   
sortOn :: Ord b => (a -> b) -> [a] -> [a] -- | The permutations function returns the list of all permutations -- of the argument. -- --
--   >>> permutations "abc"
--   ["abc","bac","cba","bca","cab","acb"]
--   
permutations :: () => [a] -> [[a]] -- | The subsequences function returns the list of all subsequences -- of the argument. -- --
--   >>> subsequences "abc"
--   ["","a","b","ab","c","ac","bc","abc"]
--   
subsequences :: () => [a] -> [[a]] -- | The tails function returns all final segments of the argument, -- longest first. For example, -- --
--   >>> tails "abc"
--   ["abc","bc","c",""]
--   
-- -- Note that tails has the following strictness property: -- tails _|_ = _|_ : _|_ tails :: () => [a] -> [[a]] -- | The inits function returns all initial segments of the -- argument, shortest first. For example, -- --
--   >>> inits "abc"
--   ["","a","ab","abc"]
--   
-- -- Note that inits has the following strictness property: -- inits (xs ++ _|_) = inits xs ++ _|_ -- -- In particular, inits _|_ = [] : _|_ inits :: () => [a] -> [[a]] -- | The groupBy function is the non-overloaded version of -- group. groupBy :: () => (a -> a -> Bool) -> [a] -> [[a]] -- | The group function takes a list and returns a list of lists -- such that the concatenation of the result is equal to the argument. -- Moreover, each sublist in the result contains only equal elements. For -- example, -- --
--   >>> group "Mississippi"
--   ["M","i","ss","i","ss","i","pp","i"]
--   
-- -- It is a special case of groupBy, which allows the programmer to -- supply their own equality test. group :: Eq a => [a] -> [[a]] -- | The deleteFirstsBy function takes a predicate and two lists and -- returns the first list with the first occurrence of each element of -- the second list removed. deleteFirstsBy :: () => (a -> a -> Bool) -> [a] -> [a] -> [a] -- | The unzip7 function takes a list of seven-tuples and returns -- seven lists, analogous to unzip. unzip7 :: () => [(a, b, c, d, e, f, g)] -> ([a], [b], [c], [d], [e], [f], [g]) -- | The unzip6 function takes a list of six-tuples and returns six -- lists, analogous to unzip. unzip6 :: () => [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f]) -- | The unzip5 function takes a list of five-tuples and returns -- five lists, analogous to unzip. unzip5 :: () => [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) -- | The unzip4 function takes a list of quadruples and returns four -- lists, analogous to unzip. unzip4 :: () => [(a, b, c, d)] -> ([a], [b], [c], [d]) -- | The zipWith7 function takes a function which combines seven -- elements, as well as seven lists and returns a list of their -- point-wise combination, analogous to zipWith. zipWith7 :: () => (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] -- | The zipWith6 function takes a function which combines six -- elements, as well as six lists and returns a list of their point-wise -- combination, analogous to zipWith. zipWith6 :: () => (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -- | The zipWith5 function takes a function which combines five -- elements, as well as five lists and returns a list of their point-wise -- combination, analogous to zipWith. zipWith5 :: () => (a -> b -> c -> d -> e -> f) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -- | The zipWith4 function takes a function which combines four -- elements, as well as four lists and returns a list of their point-wise -- combination, analogous to zipWith. zipWith4 :: () => (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] -- | The zip7 function takes seven lists and returns a list of -- seven-tuples, analogous to zip. zip7 :: () => [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)] -- | The zip6 function takes six lists and returns a list of -- six-tuples, analogous to zip. zip6 :: () => [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)] -- | The zip5 function takes five lists and returns a list of -- five-tuples, analogous to zip. zip5 :: () => [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] -- | The zip4 function takes four lists and returns a list of -- quadruples, analogous to zip. zip4 :: () => [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] -- | The genericReplicate function is an overloaded version of -- replicate, which accepts any Integral value as the -- number of repetitions to make. genericReplicate :: Integral i => i -> a -> [a] -- | The genericIndex function is an overloaded version of -- !!, which accepts any Integral value as the index. genericIndex :: Integral i => [a] -> i -> a -- | The genericSplitAt function is an overloaded version of -- splitAt, which accepts any Integral value as the -- position at which to split. genericSplitAt :: Integral i => i -> [a] -> ([a], [a]) -- | The genericDrop function is an overloaded version of -- drop, which accepts any Integral value as the number of -- elements to drop. genericDrop :: Integral i => i -> [a] -> [a] -- | The genericTake function is an overloaded version of -- take, which accepts any Integral value as the number of -- elements to take. genericTake :: Integral i => i -> [a] -> [a] -- | The genericLength function is an overloaded version of -- length. In particular, instead of returning an Int, it -- returns any type which is an instance of Num. It is, however, -- less efficient than length. genericLength :: Num i => [a] -> i -- | The non-overloaded version of insert. insertBy :: () => (a -> a -> Ordering) -> a -> [a] -> [a] -- | The insert function takes an element and a list and inserts the -- element into the list at the first position where it is less than or -- equal to the next element. In particular, if the list is sorted before -- the call, the result will also be sorted. It is a special case of -- insertBy, which allows the programmer to supply their own -- comparison function. -- --
--   >>> insert 4 [1,2,3,5,6,7]
--   [1,2,3,4,5,6,7]
--   
insert :: Ord a => a -> [a] -> [a] -- | The partition function takes a predicate a list and returns the -- pair of lists of elements which do and do not satisfy the predicate, -- respectively; i.e., -- --
--   partition p xs == (filter p xs, filter (not . p) xs)
--   
-- --
--   >>> partition (`elem` "aeiou") "Hello World!"
--   ("eoo","Hll Wrld!")
--   
partition :: () => (a -> Bool) -> [a] -> ([a], [a]) -- | The transpose function transposes the rows and columns of its -- argument. For example, -- --
--   >>> transpose [[1,2,3],[4,5,6]]
--   [[1,4],[2,5],[3,6]]
--   
-- -- If some of the rows are shorter than the following rows, their -- elements are skipped: -- --
--   >>> transpose [[10,11],[20],[],[30,31,32]]
--   [[10,20,30],[11,31],[32]]
--   
transpose :: () => [[a]] -> [[a]] -- | The intersectBy function is the non-overloaded version of -- intersect. intersectBy :: () => (a -> a -> Bool) -> [a] -> [a] -> [a] -- | The intersect function takes the list intersection of two -- lists. For example, -- --
--   >>> [1,2,3,4] `intersect` [2,4,6,8]
--   [2,4]
--   
-- -- If the first list contains duplicates, so will the result. -- --
--   >>> [1,2,2,3,4] `intersect` [6,4,4,2]
--   [2,2,4]
--   
-- -- It is a special case of intersectBy, which allows the -- programmer to supply their own equality test. If the element is found -- in both the first and the second list, the element from the first list -- will be used. intersect :: Eq a => [a] -> [a] -> [a] -- | The unionBy function is the non-overloaded version of -- union. unionBy :: () => (a -> a -> Bool) -> [a] -> [a] -> [a] -- | The union function returns the list union of the two lists. For -- example, -- --
--   >>> "dog" `union` "cow"
--   "dogcw"
--   
-- -- Duplicates, and elements of the first list, are removed from the the -- second list, but if the first list contains duplicates, so will the -- result. It is a special case of unionBy, which allows the -- programmer to supply their own equality test. union :: Eq a => [a] -> [a] -> [a] -- | The \\ function is list difference (non-associative). In the -- result of xs \\ ys, the first occurrence of -- each element of ys in turn (if any) has been removed from -- xs. Thus -- --
--   (xs ++ ys) \\ xs == ys.
--   
-- --
--   >>> "Hello World!" \\ "ell W"
--   "Hoorld!"
--   
-- -- It is a special case of deleteFirstsBy, which allows the -- programmer to supply their own equality test. (\\) :: Eq a => [a] -> [a] -> [a] infix 5 \\ -- | The deleteBy function behaves like delete, but takes a -- user-supplied equality predicate. -- --
--   >>> deleteBy (<=) 4 [1..10]
--   [1,2,3,5,6,7,8,9,10]
--   
deleteBy :: () => (a -> a -> Bool) -> a -> [a] -> [a] -- | delete x removes the first occurrence of x -- from its list argument. For example, -- --
--   >>> delete 'a' "banana"
--   "bnana"
--   
-- -- It is a special case of deleteBy, which allows the programmer -- to supply their own equality test. delete :: Eq a => a -> [a] -> [a] -- | The findIndices function extends findIndex, by returning -- the indices of all elements satisfying the predicate, in ascending -- order. -- --
--   >>> findIndices (`elem` "aeiou") "Hello World!"
--   [1,4,7]
--   
findIndices :: () => (a -> Bool) -> [a] -> [Int] -- | The findIndex function takes a predicate and a list and returns -- the index of the first element in the list satisfying the predicate, -- or Nothing if there is no such element. -- --
--   >>> findIndex isSpace "Hello World!"
--   Just 5
--   
findIndex :: () => (a -> Bool) -> [a] -> Maybe Int -- | The elemIndices function extends elemIndex, by returning -- the indices of all elements equal to the query element, in ascending -- order. -- --
--   >>> elemIndices 'o' "Hello World"
--   [4,7]
--   
elemIndices :: Eq a => a -> [a] -> [Int] -- | The elemIndex function returns the index of the first element -- in the given list which is equal (by ==) to the query element, -- or Nothing if there is no such element. -- --
--   >>> elemIndex 4 [0..]
--   Just 4
--   
elemIndex :: Eq a => a -> [a] -> Maybe Int -- | The stripPrefix function drops the given prefix from a list. It -- returns Nothing if the list did not start with the prefix -- given, or Just the list after the prefix, if it does. -- --
--   >>> stripPrefix "foo" "foobar"
--   Just "bar"
--   
-- --
--   >>> stripPrefix "foo" "foo"
--   Just ""
--   
-- --
--   >>> stripPrefix "foo" "barfoo"
--   Nothing
--   
-- --
--   >>> stripPrefix "foo" "barfoobaz"
--   Nothing
--   
stripPrefix :: Eq a => [a] -> [a] -> Maybe [a] -- | The dropWhileEnd function drops the largest suffix of a list in -- which the given predicate holds for all elements. For example: -- --
--   >>> dropWhileEnd isSpace "foo\n"
--   "foo"
--   
-- --
--   >>> dropWhileEnd isSpace "foo bar"
--   "foo bar"
--   
-- --
--   dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefined
--   
dropWhileEnd :: () => (a -> Bool) -> [a] -> [a] -- | 'iterate\'' is the strict version of iterate. -- -- It ensures that the result of each application of force to weak head -- normal form before proceeding. iterate' :: () => (a -> a) -> a -> [a] -- | A strictly accumulating version of scanl scanl' :: () => (b -> a -> b) -> b -> [a] -> [b] -- | A strict version of foldl1 foldl1' :: () => (a -> a -> a) -> [a] -> a 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 haskell source? haskellSource :: FilePath -> Bool -- | Is cabal file? cabalFile :: FilePath -> Bool -- | Add N tabs to line tab :: 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 -- | No Nulls in JSON object noNulls :: [Pair] -> [Pair] -- | Try convert json to value fromJSON' :: FromJSON a => Value -> Maybe a -- | 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 -- | Run actions ignoring errors tries :: MonadPlus m => [m a] -> m [a] triesMap :: MonadPlus m => (a -> m b) -> [a] -> m [b] -- | Lift IO exceptions to ExceptT liftIOErrors :: MonadCatch m => ExceptT String m a -> ExceptT String m a -- | Log exceptions and ignore logAll :: (MonadLog m, MonadCatch m) => m () -> m () fromUtf8 :: ByteString -> String toUtf8 :: String -> ByteString -- | Read file in UTF8 readFileUtf8 :: FilePath -> IO Text writeFileUtf8 :: FilePath -> Text -> IO () hGetLineBS :: Handle -> IO ByteString logIO :: MonadCatch m => String -> (String -> m ()) -> m () -> m () ignoreIO :: MonadCatch m => m () -> m () logAsync :: (MonadIO m, MonadCatch m) => (String -> m ()) -> m () -> m () class FromCmd a cmdP :: FromCmd a => Parser a cmdJson :: String -> [Pair] -> Value 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] -- | Parse Distribution.Text parseDT :: (Monad m, Text a) => String -> String -> m a -- | Measure time of action timer :: MonadLog m => Text -> m a -> m a -- | 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 :: Type -> Type) -- | Lift a computation from the IO monad. liftIO :: MonadIO m => IO a -> m a 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 System.Directory.Paths -- | Takes much less memory than FilePath type Path = Text path :: Lens' Path FilePath fromFilePath :: FilePath -> Path joinPaths :: [Path] -> Path splitPaths :: Path -> [Path] normPath :: Path -> Path subPath :: Path -> Path -> Path -- | Make path relative relPathTo :: Path -> Path -> Path dirExists :: Path -> IO Bool fileExists :: Path -> IO Bool takeDir :: Path -> Path -- | Is one path parent of another isParent :: Path -> Path -> Bool -- | 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 => Path -> a -> a -- | Relativise paths relativise :: Paths a => Path -> a -> a -- | Normalize paths, with workaround for Windows drives normalize :: Paths a => a -> a instance System.Directory.Paths.Paths GHC.IO.FilePath instance System.Directory.Paths.Paths System.Directory.Paths.Path module HsDev.Display class Display a display :: Display a => a -> String displayType :: Display a => a -> String instance HsDev.Display.Display GHC.IO.FilePath instance HsDev.Display.Display System.Directory.Paths.Path module HsDev.PackageDb.Types data PackageDb GlobalDb :: PackageDb UserDb :: PackageDb PackageDb :: Path -> PackageDb [_packageDb] :: PackageDb -> Path packageDb :: Traversal' PackageDb Path -- | Stack of PackageDb in reverse order newtype PackageDbStack PackageDbStack :: [PackageDb] -> PackageDbStack [_packageDbStack] :: PackageDbStack -> [PackageDb] packageDbStack :: Iso' PackageDbStack [PackageDb] -- | Make PackageDbStack from list of PackageDb mkPackageDbStack :: [PackageDb] -> PackageDbStack -- | Global db stack globalDb :: PackageDbStack -- | User db stack userDb :: PackageDbStack -- | Make package-db stack from paths fromPackageDbs :: [Path] -> 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.Types.PackageDbStack instance HsDev.Display.Display HsDev.PackageDb.Types.PackageDbStack instance Text.Format.Formattable HsDev.PackageDb.Types.PackageDbStack instance Data.Aeson.Types.ToJSON.ToJSON HsDev.PackageDb.Types.PackageDbStack instance Data.Aeson.Types.FromJSON.FromJSON HsDev.PackageDb.Types.PackageDbStack instance System.Directory.Paths.Paths HsDev.PackageDb.Types.PackageDbStack instance GHC.Show.Show HsDev.PackageDb.Types.PackageDbStack instance GHC.Classes.Ord HsDev.PackageDb.Types.PackageDbStack instance GHC.Classes.Eq HsDev.PackageDb.Types.PackageDbStack instance Control.DeepSeq.NFData HsDev.PackageDb.Types.PackageDb instance GHC.Show.Show HsDev.PackageDb.Types.PackageDb instance HsDev.Display.Display HsDev.PackageDb.Types.PackageDb instance Text.Format.Formattable HsDev.PackageDb.Types.PackageDb instance Data.Aeson.Types.ToJSON.ToJSON HsDev.PackageDb.Types.PackageDb instance Data.Aeson.Types.FromJSON.FromJSON HsDev.PackageDb.Types.PackageDb instance System.Directory.Paths.Paths HsDev.PackageDb.Types.PackageDb instance GHC.Classes.Ord HsDev.PackageDb.Types.PackageDb instance GHC.Classes.Eq HsDev.PackageDb.Types.PackageDb module HsDev.Project.Types -- | Project build tool data BuildTool CabalTool :: BuildTool StackTool :: BuildTool data Sandbox Sandbox :: BuildTool -> Path -> Sandbox [_sandboxType] :: Sandbox -> BuildTool [_sandbox] :: Sandbox -> Path sandboxType :: Lens' Sandbox BuildTool sandbox :: Lens' Sandbox Path -- | Cabal project data Project Project :: Text -> Path -> Path -> Maybe ProjectDescription -> BuildTool -> Maybe PackageDbStack -> Project [_projectName] :: Project -> Text [_projectPath] :: Project -> Path [_projectCabal] :: Project -> Path [_projectDescription] :: Project -> Maybe ProjectDescription [_projectBuildTool] :: Project -> BuildTool [_projectPackageDbStack] :: Project -> Maybe PackageDbStack projectName :: Lens' Project Text projectPath :: Lens' Project Path projectCabal :: Lens' Project Path projectDescription :: Lens' Project (Maybe ProjectDescription) projectBuildTool :: Lens' Project BuildTool projectPackageDbStack :: Lens' Project (Maybe PackageDbStack) -- | Make project by .cabal file project :: FilePath -> Project data ProjectDescription ProjectDescription :: Text -> Maybe Library -> [Executable] -> [Test] -> ProjectDescription [_projectVersion] :: ProjectDescription -> Text [_projectLibrary] :: ProjectDescription -> Maybe Library [_projectExecutables] :: ProjectDescription -> [Executable] [_projectTests] :: ProjectDescription -> [Test] projectVersion :: Lens' ProjectDescription Text projectLibrary :: Lens' ProjectDescription (Maybe Library) projectExecutables :: Lens' ProjectDescription [Executable] projectTests :: Lens' ProjectDescription [Test] -- | Build target infos infos :: Traversal' ProjectDescription Info -- | Build target infos, more detailed targetInfos :: ProjectDescription -> [TargetInfo] class Target a targetName :: Target a => Traversal' a Text buildInfo :: Target a => Lens' a Info targetMain :: Target a => a -> Maybe Path targetModules :: Target a => a -> [[Text]] data TargetInfo TargetInfo :: Maybe Text -> Info -> Maybe Path -> [[Text]] -> TargetInfo [_targetInfoName] :: TargetInfo -> Maybe Text [_targetBuildInfo] :: TargetInfo -> Info [_targetInfoMain] :: TargetInfo -> Maybe Path [_targetInfoModules] :: TargetInfo -> [[Text]] targetInfoName :: Lens' TargetInfo (Maybe Text) targetBuildInfo :: Lens' TargetInfo Info targetInfoMain :: Lens' TargetInfo (Maybe Path) targetInfoModules :: Lens' TargetInfo [[Text]] targetInfo :: Target a => a -> TargetInfo -- | Library in project data Library Library :: [[Text]] -> Info -> Library [_libraryModules] :: Library -> [[Text]] [_libraryBuildInfo] :: Library -> Info libraryModules :: Lens' Library [[Text]] libraryBuildInfo :: Lens' Library Info -- | Executable data Executable Executable :: Text -> Path -> Info -> Executable [_executableName] :: Executable -> Text [_executablePath] :: Executable -> Path [_executableBuildInfo] :: Executable -> Info executableName :: Lens' Executable Text executablePath :: Lens' Executable Path executableBuildInfo :: Lens' Executable Info -- | Test data Test Test :: Text -> Bool -> Maybe Path -> Info -> Test [_testName] :: Test -> Text [_testEnabled] :: Test -> Bool [_testMain] :: Test -> Maybe Path [_testBuildInfo] :: Test -> Info testName :: Lens' Test Text testEnabled :: Lens' Test Bool testBuildInfo :: Lens' Test Info testMain :: Lens' Test (Maybe Path) -- | Build info data Info Info :: [Text] -> Maybe Language -> [Extension] -> [Text] -> [Path] -> [[Text]] -> Info [_infoDepends] :: Info -> [Text] [_infoLanguage] :: Info -> Maybe Language [_infoExtensions] :: Info -> [Extension] [_infoGHCOptions] :: Info -> [Text] [_infoSourceDirs] :: Info -> [Path] [_infoOtherModules] :: Info -> [[Text]] infoDepends :: Lens' Info [Text] infoLanguage :: Lens' Info (Maybe Language) infoExtensions :: Lens' Info [Extension] infoGHCOptions :: Lens' Info [Text] infoSourceDirs :: Lens' Info [Path] infoOtherModules :: Lens' Info [[Text]] -- | Entity with project extensions data Extensions a Extensions :: [Extension] -> [Text] -> a -> Extensions a [_extensions] :: Extensions a -> [Extension] [_ghcOptions] :: Extensions a -> [Text] [_entity] :: Extensions a -> a extensions :: forall a_a1wPJ. Lens' (Extensions a_a1wPJ) [Extension] ghcOptions :: forall a_a1wPJ. Lens' (Extensions a_a1wPJ) [Text] entity :: forall a_a1wPJ a_a1ygD. Lens (Extensions a_a1wPJ) (Extensions a_a1ygD) a_a1wPJ a_a1ygD instance HsDev.Project.Types.Target HsDev.Project.Types.Library instance HsDev.Project.Types.Target HsDev.Project.Types.Executable instance HsDev.Project.Types.Target HsDev.Project.Types.Test instance HsDev.Project.Types.Target HsDev.Project.Types.TargetInfo 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.Show.Show HsDev.Project.Types.TargetInfo instance GHC.Classes.Ord HsDev.Project.Types.TargetInfo instance GHC.Classes.Eq HsDev.Project.Types.TargetInfo 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 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 instance System.Directory.Paths.Paths HsDev.Project.Types.TargetInfo 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 HsDev.Display.Display HsDev.Project.Types.Project instance Text.Format.Formattable 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 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 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 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.Semigroup HsDev.Project.Types.Info 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 Control.DeepSeq.NFData HsDev.Project.Types.Sandbox instance GHC.Show.Show HsDev.Project.Types.Sandbox instance HsDev.Display.Display HsDev.Project.Types.Sandbox instance Text.Format.Formattable HsDev.Project.Types.Sandbox instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Project.Types.Sandbox instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Project.Types.Sandbox instance System.Directory.Paths.Paths HsDev.Project.Types.Sandbox instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.Extension.Language instance Data.Aeson.Types.FromJSON.FromJSON Language.Haskell.Extension.Language instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.Extension.Extension instance Data.Aeson.Types.FromJSON.FromJSON Language.Haskell.Extension.Extension instance GHC.Classes.Ord HsDev.Project.Types.Sandbox instance GHC.Classes.Eq HsDev.Project.Types.Sandbox instance GHC.Enum.Bounded HsDev.Project.Types.BuildTool instance GHC.Enum.Enum HsDev.Project.Types.BuildTool instance GHC.Show.Show HsDev.Project.Types.BuildTool instance GHC.Read.Read HsDev.Project.Types.BuildTool instance GHC.Classes.Ord HsDev.Project.Types.BuildTool instance GHC.Classes.Eq HsDev.Project.Types.BuildTool instance Control.DeepSeq.NFData HsDev.Project.Types.BuildTool instance HsDev.Display.Display HsDev.Project.Types.BuildTool instance Text.Format.Formattable HsDev.Project.Types.BuildTool instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Project.Types.BuildTool instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Project.Types.BuildTool module HsDev.Symbols.Location -- | Just package name and version without its location data ModulePackage ModulePackage :: Text -> Text -> ModulePackage [_packageName] :: ModulePackage -> Text [_packageVersion] :: ModulePackage -> Text mkPackage :: Text -> ModulePackage data PackageConfig PackageConfig :: ModulePackage -> [Text] -> Bool -> PackageConfig [_package] :: PackageConfig -> ModulePackage [_packageModules] :: PackageConfig -> [Text] [_packageExposed] :: PackageConfig -> Bool -- | Location of module data ModuleLocation FileModule :: Path -> Maybe Project -> ModuleLocation [_moduleFile] :: ModuleLocation -> Path [_moduleProject] :: ModuleLocation -> Maybe Project InstalledModule :: [Path] -> ModulePackage -> Text -> Bool -> ModuleLocation [_moduleInstallDirs] :: ModuleLocation -> [Path] [_modulePackage] :: ModuleLocation -> ModulePackage [_installedModuleName] :: ModuleLocation -> Text [_installedModuleExposed] :: ModuleLocation -> Bool OtherLocation :: Text -> ModuleLocation [_otherLocationName] :: ModuleLocation -> Text NoLocation :: ModuleLocation locationId :: ModuleLocation -> Text noLocation :: ModuleLocation data ModuleId ModuleId :: Text -> ModuleLocation -> ModuleId [_moduleName] :: ModuleId -> Text [_moduleLocation] :: ModuleId -> ModuleLocation moduleName :: Lens' ModuleId Text moduleLocation :: Lens' ModuleId ModuleLocation -- | Symbol data SymbolId SymbolId :: Text -> ModuleId -> SymbolId [_symbolName] :: SymbolId -> Text [_symbolModule] :: SymbolId -> ModuleId symbolName :: Lens' SymbolId Text symbolModule :: Lens' SymbolId ModuleId 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 -> Text -> Text -- | Location of symbol data Location Location :: ModuleLocation -> Maybe Position -> Location [_locationModule] :: Location -> ModuleLocation [_locationPosition] :: Location -> Maybe Position packageName :: Lens' ModulePackage Text packageVersion :: Lens' ModulePackage Text package :: Lens' PackageConfig ModulePackage packageModules :: Lens' PackageConfig [Text] packageExposed :: Lens' PackageConfig Bool moduleFile :: Traversal' ModuleLocation Path moduleProject :: Traversal' ModuleLocation (Maybe Project) moduleInstallDirs :: Traversal' ModuleLocation [Path] modulePackage :: Traversal' ModuleLocation ModulePackage installedModuleName :: Traversal' ModuleLocation Text installedModuleExposed :: Traversal' ModuleLocation Bool otherLocationName :: Traversal' ModuleLocation Text 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 -> Path -> Path -- | Path to module source >importPath Quux.Blah = "Quux/Blah.hs" importPath :: Text -> Path -- | Root of sources, package dir or root directory of standalone modules sourceRoot :: ModuleId -> Maybe Path sourceRoot_ :: ModuleId -> Path -- | 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 => Text -> Int -> a -> a -- | Inverse of recalcTabs: interpret '\t' as N symbols instead of 1 calcTabs :: RecalcTabs a => Text -> Int -> a -> a instance HsDev.Symbols.Location.RecalcTabs HsDev.Symbols.Location.Position instance HsDev.Symbols.Location.RecalcTabs HsDev.Symbols.Location.Region 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 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.SymbolId instance GHC.Show.Show HsDev.Symbols.Location.SymbolId instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Location.SymbolId instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Location.SymbolId instance GHC.Classes.Ord HsDev.Symbols.Location.SymbolId instance GHC.Classes.Eq HsDev.Symbols.Location.SymbolId instance Control.DeepSeq.NFData HsDev.Symbols.Location.ModuleId instance GHC.Show.Show HsDev.Symbols.Location.ModuleId instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Location.ModuleId instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Location.ModuleId instance GHC.Classes.Ord HsDev.Symbols.Location.ModuleId instance GHC.Classes.Eq HsDev.Symbols.Location.ModuleId instance Control.DeepSeq.NFData HsDev.Symbols.Location.ModuleLocation instance GHC.Show.Show HsDev.Symbols.Location.ModuleLocation instance HsDev.Display.Display HsDev.Symbols.Location.ModuleLocation instance Text.Format.Formattable 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.Eq HsDev.Symbols.Location.ModuleLocation instance GHC.Classes.Ord 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.Types -- | hsdev exception type data HsDevError HsDevFailure :: HsDevError ModuleNotSource :: ModuleLocation -> HsDevError BrowseNoModuleInfo :: String -> HsDevError FileNotFound :: Path -> HsDevError ToolNotFound :: String -> HsDevError ProjectNotFound :: Text -> HsDevError PackageNotFound :: Text -> 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 SQLiteError :: String -> HsDevError OtherError :: String -> HsDevError UnhandledError :: String -> HsDevError instance Control.DeepSeq.NFData HsDev.Types.HsDevError instance GHC.Show.Show HsDev.Types.HsDevError instance GHC.Base.Semigroup HsDev.Types.HsDevError instance GHC.Base.Monoid 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.Type.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_a1X41. Lens' (Message a_a1X41) (Maybe String) message :: forall a_a1X41 a_a1X9p. Lens (Message a_a1X41) (Message a_a1X9p) a_a1X41 a_a1X9p -- | Get messages by id messagesById :: Maybe String -> [Message a] -> [a] -- | Notification from server newtype Notification Notification :: Value -> Notification -- | Result from server data Result -- | Result Result :: Value -> Result -- | Error Error :: HsDevError -> Result -- | Part of result list, returns via notification newtype ResultPart ResultPart :: Value -> ResultPart newtype Response Response :: Either Notification Result -> Response [unResponse] :: Response -> Either Notification Result isNotification :: Response -> Bool result :: ToJSON a => a -> Response responseError :: HsDevError -> Response groupResponses :: [Response] -> [([Notification], Result)] -- | Decode lisp or json request decodeMessage :: FromJSON a => ByteString -> Either (Msg String) (Msg (Message a)) encodeMessage :: ToJSON a => Msg (Message a) -> ByteString 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 HsDev.Server.Message.Response instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Message.Response 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.Result instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Message.Result 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 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 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) -- | 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 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_a20je. Lens' (Note a_a20je) ModuleLocation noteRegion :: forall a_a20je. Lens' (Note a_a20je) Region noteLevel :: forall a_a20je. Lens' (Note a_a20je) (Maybe Severity) note :: forall a_a20je a_a20v8. Lens (Note a_a20je) (Note a_a20v8) a_a20je a_a20v8 -- | Output message from some tool (ghc, ghc-mod, hlint) with optional -- suggestion data OutputMessage OutputMessage :: Text -> Maybe Text -> OutputMessage [_message] :: OutputMessage -> Text [_messageSuggestion] :: OutputMessage -> Maybe Text message :: Lens' OutputMessage Text messageSuggestion :: Lens' OutputMessage (Maybe Text) outputMessage :: Text -> 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 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.Classes.Ord a => GHC.Classes.Ord (HsDev.Tools.Types.Note a) 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 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.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 a) -> Int -> a at_ :: IsString s => (Int -> Maybe s) -> Int -> s 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. -- -- Instances of Eq and Ord are provided, which gives exact -- equality and lexicographic ordering of the version number components -- (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). -- -- This type is opaque and distinct from the Version type in -- Data.Version since Cabal-2.0. The difference extends -- to the Binary instance using a different (and more compact) -- encoding. 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.Tabs -- | Some tools counts tab as 8 symbols and return such file positions; -- convert them (consider tab = one symbol) recalcNotesTabs :: Map Path Text -> [Note a] -> IO [Note a] module HsDev.Tools.Refact data Refact Refact :: Text -> Replace Text -> Refact [_refactMessage] :: Refact -> Text [_refactAction] :: Refact -> Replace Text refactMessage :: Lens' Refact Text refactAction :: Lens' Refact (Replace Text) refact :: [Refact] -> Text -> Text update :: Regioned a => [Refact] -> [a] -> [a] -- | Replace region with data replace :: EditAction e s => Region -> s -> e s -- | Cuts region cut :: EditAction e s => Region -> e s -- | Pastes Contents at some Point paste :: EditAction e s => Point -> s -> e s fromRegion :: Region -> Region fromPosition :: Position -> Point instance Data.Text.Region.Types.Regioned HsDev.Tools.Refact.Refact instance GHC.Show.Show HsDev.Tools.Refact.Refact instance GHC.Classes.Eq HsDev.Tools.Refact.Refact instance GHC.Classes.Ord HsDev.Tools.Refact.Refact instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Tools.Refact.Refact instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Refact.Refact module HsDev.Tools.AutoFix corrections :: [Note OutputMessage] -> [Note Refact] type CorrectorMatch = Note OutputMessage -> Maybe (Note Refact) correctors :: [CorrectorMatch] match :: String -> ((Int -> Maybe Text) -> Region -> Refact) -> CorrectorMatch findCorrector :: Note OutputMessage -> Maybe (Note Refact) -- | A Group is a Monoid plus a function, invert, such -- that: -- --
--   a <> invert a == mempty
--   
-- --
--   invert a <> a == mempty
--   
class Monoid m => Group m invert :: Group m => m -> m -- |
--   pow a n == a <> a <> ... <> a
--   
-- --
--   (n lots of a)
--   
-- -- If n is negative, the result is inverted. pow :: (Group m, Integral x) => m -> x -> m -- | An Abelian group is a Group that follows the rule: -- --
--   a <> b == b <> a
--   
class Group g => Abelian g -- | Get undo undo :: Editable s => Edit s -> s -> Edit s -- | perform for Edit apply :: Editable s => Edit s -> s -> s -- | Overwrites Contents at some Point overwrite :: EditAction e s => Point -> s -> e s -- | Pastes Contents at some Point paste :: EditAction e s => Point -> s -> e s -- | Cuts region cut :: EditAction e s => Region -> e s -- | Replace region with data replace :: EditAction e s => Region -> s -> e s -- | Update second region position as if it was data inserted at first -- region (region sets insertion point and data size) Region tries not to -- extend if data inserted at region bound except when region is empty -- This allows define replace as cut and insert in special case when we -- replace region itself insertRegion :: Region -> Region -> Region -- | Update second Region position as if it was data cutted at first -- Region cutRegion :: Region -> Region -> Region -- | Opposite to cutMap insertMap :: Region -> Map -- | Cut Region mapping cutMap :: Region -> Map applyMap :: Map -> Region -> Region -- | Does regions overlaps overlaps :: Region -> Region -> Bool -- | Get contents at Region atRegion :: Editable s => Region -> Lens' (Contents s) (Contents s) -- | Expand Region to contain full lines expandLines :: Region -> Region -- | Make Region by start position and Size regionSize :: Point -> Size -> Region -- | n'th line region, starts at the beginning of line and ends on the next -- line line :: Int -> Region -- | Is Region empty emptyRegion :: Region -> Bool regionLines :: Lens' Region Int -- | Distance of n lines linesSize :: Int -> Size -- | Region from one Point to another till :: Point -> Point -> Region -- | Regions length regionLength :: Lens' Region Size -- | Point at the beginning of line lineStart :: Int -> Point -- | Point at the beginning start :: Point -- | Make Point from line and column pt :: Int -> Int -> Point class Editable s => EditAction (e :: Type -> Type) s -- | Make replace action over Region and Contents replaceAction :: EditAction e s => Region -> Contents s -> e s -- | Make Map from action actionMap :: EditAction e s => e s -> Map -- | Perform action, modifying Contents perform :: EditAction e s => e s -> Contents s -> Contents s -- | Get action undo inversed :: EditAction e s => e s -> Contents s -> e s replaces :: () => Iso (Edit s1) (Edit s2) [Replace s1] [Replace s2] class Regioned a regions :: Regioned a => Traversal' a Region replaceWith :: () => Lens (Replace s1) (Replace s2) (Contents s1) (Contents s2) replaceRegion :: () => Lens' (Replace s) Region -- | Edit is several replace actions, applied simultaneously, must not -- overlap newtype Edit s Edit :: [Replace s] -> Edit s [_replaces] :: Edit s -> [Replace s] -- | Contents Size measure :: Editable s => Contents s -> Size by :: Editable a => a -> Contents a -- | Get Contents for some Editable, splitting lines contents :: (Editable a, Editable b) => Iso a b (Contents a) (Contents b) -- | Get splitted Contents at some Point splitted :: Editable a => Point -> Iso' (Contents a) (Contents a, Contents a) -- | Split Contents at some Point splitCts :: Editable a => Point -> Contents a -> (Contents a, Contents a) concatCts :: Monoid a => Contents a -> Contents a -> Contents a -- | Empty contents are contents with one empty line emptyContents :: Monoid a => Contents a regionTo :: Lens' Region Point regionFrom :: Lens' Region Point -- | Main idea is that there are only two basic actions, that changes -- regions: inserting and cutting When something is cutted out or -- inserted in, Region positions must be updated All editings can -- be represented as many cuts and inserts, so we can combine them to get -- function which maps source regions to regions on updated data Because -- insert is dual to cut (and therefore composes something like iso), we -- can also get function to map regions back Combining this functions -- while edit, we get function, that maps regions from source data to -- edited one To get back function, we must also combine opposite -- actions, or we can represent actions as Iso Same idea goes for -- modifying contents, represent each action as isomorphism and combine -- them together This works if we don't use overlapped regions newtype Map Map :: Iso' Region Region -> Map [mapIso] :: Map -> Iso' Region Region -- | Contents is list of lines, list must have at least one (maybe empty) -- line type Contents a = [a] -- | Something editable, string types implements this class Monoid a => Editable a -- | Split editable at some position splitContents :: Editable a => Int -> a -> (a, a) contentsLength :: Editable a => a -> Int splitLines :: Editable a => a -> [a] joinLines :: Editable a => [a] -> a -- | Serializable edit action data Replace s Replace :: Region -> Contents s -> Replace s -- | Region to replace [_replaceRegion] :: Replace s -> Region -- | Contents to replace with [_replaceWith] :: Replace s -> Contents s -- | Opposite to .-. -- --
--   (pt .-. base) .+. base = pt
--   
(.+.) :: Point -> Point -> Point -- | pt .-. base is distance from base to pt -- Distance can't be less then zero lines and columns (.-.) :: Point -> Point -> Point -- | As empty region pointRegion :: Iso' Point Region pointLine :: Lens' Point Int pointColumn :: Lens' Point Int -- | Distance between Points is measured in lines and columns. And -- it is defined, that distance between point at l:c and point (l + 1):0 -- is one line no matter c is because we need to go to new line to reach -- destination point Columns are taken into account only if points are on -- the same line type Size = Point -- | Point at text: zero-based line and column data Point Point :: Int -> Int -> Point [_pointLine] :: Point -> Int [_pointColumn] :: Point -> Int instance Data.Text.Region.Types.Regioned a => Data.Text.Region.Types.Regioned (HsDev.Tools.Types.Note a) module HsDev.Tools.HLint hlint :: [String] -> FilePath -> Maybe Text -> ExceptT String IO [Note OutputMessage] hlintSupported :: Bool 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.Ghc.Base -- | Run ghc ghcRun :: GhcMonad m => [String] -> m a -> m a -- | Run ghc ghcRunWith :: GhcMonad m => (DynFlags -> DynFlags) -> [String] -> m a -> m a interpretedFlags :: DynFlags -> DynFlags noLinkFlags :: DynFlags -> DynFlags -- | Alter DynFlags temporary withFlags :: GhcMonad m => m a -> m a -- | Update DynFlags modifyFlags :: GhcMonad m => (DynFlags -> DynFlags) -> m () -- | Clear loaded targets clearTargets :: GhcMonad m => m () -- | Make target with its source code optional makeTarget :: GhcMonad m => Text -> Maybe Text -> m Target -- | Load all targets loadTargets :: GhcMonad m => [Target] -> m () -- | Load and set interactive context loadInteractive :: GhcMonad m => Path -> Maybe Text -> m () -- | Reload targets reload :: GhcMonad m => m () -- | Collect messages from ghc for underlying computation collectMessages :: GhcMonad m => m a -> m (a, [Note OutputMessage]) -- | Same as collectMessages, but when no result except notes -- needed collectMessages_ :: GhcMonad m => m () -> m [Note OutputMessage] -- | Format type for output formatType :: DynFlags -> Type -> String -- | 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 module HsDev.Tools.Ghc.Repl -- | Import some modules importModules :: GhcMonad m => [String] -> m () -- | Default interpreter modules preludeModules :: [String] -- | Evaluate expression evaluate :: GhcMonad m => String -> m String -- | Get expression type as string expressionType :: GhcMonad m => String -> m String data ReplResult a ReplError :: String -> ReplResult a ReplOk :: a -> ReplResult a tryRepl :: (GhcMonad m, MonadCatch m) => m a -> m (ReplResult a) instance GHC.Show.Show a => GHC.Show.Show (HsDev.Tools.Ghc.Repl.ReplResult a) instance GHC.Read.Read a => GHC.Read.Read (HsDev.Tools.Ghc.Repl.ReplResult a) instance GHC.Classes.Ord a => GHC.Classes.Ord (HsDev.Tools.Ghc.Repl.ReplResult a) instance GHC.Classes.Eq a => GHC.Classes.Eq (HsDev.Tools.Ghc.Repl.ReplResult a) instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (HsDev.Tools.Ghc.Repl.ReplResult a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (HsDev.Tools.Ghc.Repl.ReplResult a) module HsDev.Tools.Ghc.Worker data SessionType SessionGhci :: SessionType SessionGhc :: SessionType SessionHaddock :: SessionType SessionTmp :: SessionType data SessionConfig SessionConfig :: SessionType -> PackageDbStack -> SessionConfig type GhcM a = MGhcT SessionConfig (First DynFlags) (LogT IO) a type GhcWorker = Worker (MGhcT SessionConfig (First DynFlags) (LogT IO)) -- | Multi-session ghc monad newtype MGhcT s d m a MGhcT :: GhcT (ReaderT (Maybe FilePath) (StateT (SessionState s d) m)) a -> MGhcT s d m a [unMGhcT] :: MGhcT s d m a -> GhcT (ReaderT (Maybe FilePath) (StateT (SessionState s d) 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 :: SessionType -> PackageDbStack -> [String] -> GhcM () -- | Get ghc session ghcSession :: PackageDbStack -> [String] -> GhcM () -- | Get ghci session ghciSession :: GhcM () -- | Get haddock session with flags haddockSession :: PackageDbStack -> [String] -> GhcM () -- | Get haddock session with flags tmpSession :: PackageDbStack -> [String] -> GhcM () -- | 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 :: Type -> Type) a LogT :: ReaderT Log m a -> LogT a [runLogT] :: LogT a -> ReaderT Log m a instance GHC.Classes.Ord HsDev.Tools.Ghc.Worker.SessionConfig instance GHC.Classes.Eq HsDev.Tools.Ghc.Worker.SessionConfig instance GHC.Classes.Ord HsDev.Tools.Ghc.Worker.SessionType instance GHC.Classes.Eq HsDev.Tools.Ghc.Worker.SessionType instance GHC.Show.Show HsDev.Tools.Ghc.Worker.SessionConfig instance Text.Format.Formattable HsDev.Tools.Ghc.Worker.SessionConfig instance GHC.Show.Show HsDev.Tools.Ghc.Worker.SessionType instance Text.Format.Formattable HsDev.Tools.Ghc.Worker.SessionType 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.Tools.Ghc.System data BuildInfo BuildInfo :: String -> String -> String -> String -> String -> BuildInfo [targetArch] :: BuildInfo -> String [targetOS] :: BuildInfo -> String [cabalOS] :: BuildInfo -> String [compilerName] :: BuildInfo -> String [compilerVersion] :: BuildInfo -> String buildInfo :: DynFlags -> BuildInfo examineCompilerVersion :: DynFlags -> String -- | Can contain {arch}, {os}/{platform}, {compiler}, {version} formatBuildPath :: String -> BuildInfo -> String buildPath :: String -> GhcM FilePath module HsDev.Symbols.Parsed -- | Annotation of parsed and resolved nodes type Ann = Scoped SrcSpanInfo -- | Parsed and resolved module type Parsed = Module Ann -- | Get all qualified names qnames :: Data (ast Ann) => Traversal' (ast Ann) (QName Ann) -- | Get all names names :: Data (ast Ann) => Traversal' (ast Ann) (Name Ann) -- | Get all binders binders :: Annotated ast => Traversal' (ast Ann) (ast Ann) -- | Get all names locally defined locals :: Annotated ast => Traversal' (ast Ann) (ast Ann) -- | Get all names, references global symbol globals :: Annotated ast => Traversal' (ast Ann) (ast Ann) -- | Get all resolved references references :: Annotated ast => Traversal' (ast Ann) (ast Ann) -- | Get all names with not in scope error unresolveds :: Annotated ast => Traversal' (ast Ann) (ast Ann) -- | Get all usages of symbol usages :: Annotated ast => Name -> Traversal' (ast Ann) (ast Ann) -- | Get usages of symbols with unqualified name named :: Annotated ast => Text -> Traversal' (ast Ann) (ast Ann) -- | Get imports imports :: Data (ast Ann) => Traversal' (ast Ann) (ImportDecl Ann) -- | Get declarations declarations :: Data (ast Ann) => Traversal' (ast Ann) (Decl Ann) -- | Get module names moduleNames :: Data (ast Ann) => Traversal' (ast Ann) (ModuleName Ann) -- | Get annotation annL :: Annotated ast => Lens' (ast a) a -- | Get haskell-names symbols symbolL :: Data a => Traversal' a Symbol -- | Get source file file :: Annotated ast => Lens' (ast Ann) FilePath -- | Get source location pos :: (Annotated ast, SrcInfo isrc, Data isrc) => Lens' (ast isrc) Position -- | Definition position, if binder - returns current position defPos :: Annotated ast => Traversal' (ast Ann) Position -- | Resolved global name resolvedName :: Annotated ast => Traversal' (ast Ann) Name -- | Does ast node binds something isBinder :: Annotated ast => ast Ann -> Bool -- | Does ast node locally defined isLocal :: Annotated ast => ast Ann -> Bool -- | Does ast node reference something isGlobal :: Annotated ast => ast Ann -> Bool -- | Does ast node reference something isReference :: Annotated ast => ast Ann -> Bool -- | Is ast node not resolved isUnresolved :: Annotated ast => ast Ann -> Bool -- | Resolve error resolveError :: Annotated ast => ast Ann -> Maybe String -- | Node references to specified symbol refsTo :: Annotated ast => Name -> ast Ann -> Bool -- | Node references to specified unqualified name refsToName :: Annotated ast => Text -> ast Ann -> Bool nameInfoL :: Lens' (Scoped a) (NameInfo a) positionL :: (SrcInfo isrc, Data isrc) => Lens' isrc Position regionL :: Annotated ast => Lens' (ast Ann) Region fileL :: (SrcInfo isrc, Data isrc) => Lens' isrc FilePath -- | Get Symbol as Name symbolNameL :: Lens' Symbol Name -- | pretty-print with the default style and defaultMode. prettyPrint :: Pretty a => a -> String module HsDev.Symbols.Class class Sourced a sourcedName :: Sourced a => Lens' a Text sourcedDocs :: Sourced a => Traversal' a Text sourcedModule :: Sourced a => Lens' a ModuleId sourcedLocation :: Sourced a => Traversal' a Position sourcedModuleName :: Sourced a => Lens' a Text instance HsDev.Symbols.Class.Sourced HsDev.Symbols.Location.ModuleId instance HsDev.Symbols.Class.Sourced HsDev.Symbols.Location.SymbolId module HsDev.Symbols.Documented -- | Documented symbol class Documented a brief :: Documented a => a -> Text detailed :: Documented a => a -> Text detailed :: (Documented a, Sourced a) => a -> Text -- | Default detailed docs defaultDetailed :: (Sourced a, Documented a) => a -> [Text] instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Location.ModulePackage instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Location.ModuleLocation instance HsDev.Symbols.Documented.Documented HsDev.Project.Types.Project module HsDev.Project -- | infoSourceDirs lens with default infoSourceDirsDef :: Lens' Info [Path] -- | Get all source file names of target without prepending them with -- source-dirs targetFiles :: Target t => t -> [Path] -- | Get all source file names relative to project root projectTargetFiles :: (MonadLog m, Target t) => Project -> t -> m [Path] -- | 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 -- | Check if source related to target, source must be relative to project -- directory fileInTarget :: Path -> Info -> Bool -- | Get first target for source file fileTarget :: Project -> Path -> 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 -> Path -> [Info] -- | Finds source dir file belongs to findSourceDir :: Project -> Path -> Maybe (Extensions Path) -- | Returns source dirs for library, executables and tests sourceDirs :: ProjectDescription -> [Extensions Path] -- | 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 -- | Import data Import Import :: Position -> Text -> Bool -> Maybe Text -> Import [_importPosition] :: Import -> Position [_importName] :: Import -> Text [_importQualified] :: Import -> Bool [_importAs] :: Import -> Maybe Text importPosition :: Lens' Import Position importName :: Lens' Import Text importQualified :: Lens' Import Bool importAs :: Lens' Import (Maybe Text) -- | Module data Module Module :: ModuleId -> Maybe Text -> [Import] -> [Symbol] -> [Fixity] -> Map Name [Symbol] -> Maybe Parsed -> Module [_moduleId] :: Module -> ModuleId [_moduleDocs] :: Module -> Maybe Text [_moduleImports] :: Module -> [Import] [_moduleExports] :: Module -> [Symbol] [_moduleFixities] :: Module -> [Fixity] [_moduleScope] :: Module -> Map Name [Symbol] [_moduleSource] :: Module -> Maybe Parsed -- | Make each symbol appear only once moduleSymbols :: Traversal' Module Symbol exportedSymbols :: Traversal' Module Symbol scopeSymbols :: Traversal' Module (Symbol, [Name]) fixitiesMap :: Lens' Module (Map Name Fixity) moduleFixities :: Lens' Module [Fixity] moduleId :: Lens' Module ModuleId moduleDocs :: Lens' Module (Maybe Text) moduleImports :: Lens' Module [Import] moduleExports :: Lens' Module [Symbol] moduleScope :: Lens' Module (Map Name [Symbol]) moduleSource :: Lens' Module (Maybe Parsed) data Symbol Symbol :: SymbolId -> Maybe Text -> Maybe Position -> SymbolInfo -> Symbol [_symbolId] :: Symbol -> SymbolId [_symbolDocs] :: Symbol -> Maybe Text [_symbolPosition] :: Symbol -> Maybe Position [_symbolInfo] :: Symbol -> SymbolInfo symbolId :: Lens' Symbol SymbolId symbolDocs :: Lens' Symbol (Maybe Text) symbolPosition :: Lens' Symbol (Maybe Position) symbolInfo :: Lens' Symbol SymbolInfo data SymbolInfo Function :: Maybe Text -> SymbolInfo [_functionType] :: SymbolInfo -> Maybe Text Method :: Maybe Text -> Text -> SymbolInfo [_functionType] :: SymbolInfo -> Maybe Text [_parentClass] :: SymbolInfo -> Text Selector :: Maybe Text -> Text -> [Text] -> SymbolInfo [_functionType] :: SymbolInfo -> Maybe Text [_parentType] :: SymbolInfo -> Text [_selectorConstructors] :: SymbolInfo -> [Text] Constructor :: [Text] -> Text -> SymbolInfo [_typeArgs] :: SymbolInfo -> [Text] [_parentType] :: SymbolInfo -> Text Type :: [Text] -> [Text] -> SymbolInfo [_typeArgs] :: SymbolInfo -> [Text] [_typeContext] :: SymbolInfo -> [Text] NewType :: [Text] -> [Text] -> SymbolInfo [_typeArgs] :: SymbolInfo -> [Text] [_typeContext] :: SymbolInfo -> [Text] Data :: [Text] -> [Text] -> SymbolInfo [_typeArgs] :: SymbolInfo -> [Text] [_typeContext] :: SymbolInfo -> [Text] Class :: [Text] -> [Text] -> SymbolInfo [_typeArgs] :: SymbolInfo -> [Text] [_typeContext] :: SymbolInfo -> [Text] TypeFam :: [Text] -> [Text] -> Maybe Text -> SymbolInfo [_typeArgs] :: SymbolInfo -> [Text] [_typeContext] :: SymbolInfo -> [Text] [_familyAssociate] :: SymbolInfo -> Maybe Text DataFam :: [Text] -> [Text] -> Maybe Text -> SymbolInfo [_typeArgs] :: SymbolInfo -> [Text] [_typeContext] :: SymbolInfo -> [Text] [_familyAssociate] :: SymbolInfo -> Maybe Text PatConstructor :: [Text] -> Maybe Text -> SymbolInfo [_typeArgs] :: SymbolInfo -> [Text] [_patternType] :: SymbolInfo -> Maybe Text PatSelector :: Maybe Text -> Maybe Text -> Text -> SymbolInfo [_functionType] :: SymbolInfo -> Maybe Text [_patternType] :: SymbolInfo -> Maybe Text [_patternConstructor] :: SymbolInfo -> Text functionType :: Traversal' SymbolInfo (Maybe Text) parentClass :: Traversal' SymbolInfo Text parentType :: Traversal' SymbolInfo Text selectorConstructors :: Traversal' SymbolInfo [Text] typeArgs :: Traversal' SymbolInfo [Text] typeContext :: Traversal' SymbolInfo [Text] familyAssociate :: Traversal' SymbolInfo (Maybe Text) symbolInfoType :: SymbolInfo -> String symbolType :: Symbol -> String patternType :: Traversal' SymbolInfo (Maybe Text) patternConstructor :: Traversal' SymbolInfo Text -- | Scoped entity with qualifier data Scoped a Scoped :: Maybe Text -> a -> Scoped a [_scopeQualifier] :: Scoped a -> Maybe Text [_scoped] :: Scoped a -> a scopeQualifier :: forall a_a2DhC. Lens' (Scoped a_a2DhC) (Maybe Text) scoped :: forall a_a2DhC a_a2GrP. Lens (Scoped a_a2DhC) (Scoped a_a2GrP) a_a2DhC a_a2GrP -- | Symbol usage data SymbolUsage SymbolUsage :: Symbol -> Maybe Text -> ModuleId -> Region -> SymbolUsage [_symbolUsed] :: SymbolUsage -> Symbol [_symbolUsedQualifier] :: SymbolUsage -> Maybe Text [_symbolUsedIn] :: SymbolUsage -> ModuleId [_symbolUsedRegion] :: SymbolUsage -> Region symbolUsed :: Lens' SymbolUsage Symbol symbolUsedQualifier :: Lens' SymbolUsage (Maybe Text) symbolUsedIn :: Lens' SymbolUsage ModuleId symbolUsedRegion :: Lens' SymbolUsage Region -- | Symbol with module it's exported from data ImportedSymbol ImportedSymbol :: Symbol -> ModuleId -> ImportedSymbol [_importedSymbol] :: ImportedSymbol -> Symbol [_importedFrom] :: ImportedSymbol -> ModuleId importedSymbol :: Lens' ImportedSymbol Symbol importedFrom :: Lens' ImportedSymbol ModuleId infoOf :: EmptySymbolInfo a => a -> SymbolInfo nullifyInfo :: SymbolInfo -> SymbolInfo -- | Inspection data data Inspection -- | No inspection InspectionNone :: Inspection -- | Time and flags of inspection InspectionAt :: POSIXTime -> [Text] -> Inspection [_inspectionAt] :: Inspection -> POSIXTime [_inspectionOpts] :: Inspection -> [Text] inspectionAt :: Traversal' Inspection POSIXTime inspectionOpts :: Traversal' Inspection [Text] -- | Is left Inspection fresh comparing to right one fresh :: Inspection -> Inspection -> Bool -- | Inspected entity data Inspected k t a Inspected :: Inspection -> k -> Set t -> Either HsDevError a -> Inspected k t a [_inspection] :: Inspected k t a -> Inspection [_inspectedKey] :: Inspected k t a -> k [_inspectionTags] :: Inspected k t a -> Set t [_inspectionResult] :: Inspected k t a -> Either HsDevError a inspection :: forall k_a2Dhz t_a2DhA a_a2DhB. Lens' (Inspected k_a2Dhz t_a2DhA a_a2DhB) Inspection inspectedKey :: forall k_a2Dhz t_a2DhA a_a2DhB k_a2GwX. Lens (Inspected k_a2Dhz t_a2DhA a_a2DhB) (Inspected k_a2GwX t_a2DhA a_a2DhB) k_a2Dhz k_a2GwX inspectionTags :: forall k_a2Dhz t_a2DhA a_a2DhB t_a2GwZ. Lens (Inspected k_a2Dhz t_a2DhA a_a2DhB) (Inspected k_a2Dhz t_a2GwZ a_a2DhB) (Set t_a2DhA) (Set t_a2GwZ) inspectionResult :: forall k_a2Dhz t_a2DhA a_a2DhB a_a2GwY. Lens (Inspected k_a2Dhz t_a2DhA a_a2DhB) (Inspected k_a2Dhz t_a2DhA a_a2GwY) (Either HsDevError a_a2DhB) (Either HsDevError a_a2GwY) inspected :: Traversal (Inspected k t a) (Inspected k t b) a b newtype InspectM k t m a InspectM :: ReaderT k (ExceptT HsDevError (StateT (Inspection, Set t) m)) a -> InspectM k t m a [runInspectM] :: InspectM k t m a -> ReaderT k (ExceptT HsDevError (StateT (Inspection, Set t) m)) a runInspect :: (Monad m, Ord t) => k -> InspectM k t m a -> m (Inspected k t a) -- | Continue inspection continueInspect :: (Monad m, Ord t) => Inspected k t a -> (a -> InspectM k t m b) -> m (Inspected k t b) inspect :: MonadCatch m => m Inspection -> (k -> m a) -> InspectM k t m a inspect_ :: MonadCatch m => m Inspection -> m a -> InspectM k t m a withInspection :: MonadCatch m => m Inspection -> InspectM k t m a -> InspectM k t m a inspectedTup :: Inspected k t a -> (Inspection, k, Set t, Maybe a) -- | Empty tags noTags :: Set t -- | One tag tag :: t -> Set t data ModuleTag InferredTypesTag :: ModuleTag RefinedDocsTag :: ModuleTag OnlyHeaderTag :: ModuleTag DirtyTag :: ModuleTag ResolvedNamesTag :: ModuleTag -- | Inspected module type InspectedModule = Inspected ModuleLocation ModuleTag Module notInspected :: ModuleLocation -> InspectedModule instance HsDev.Symbols.Class.Sourced HsDev.Symbols.Types.Module instance HsDev.Symbols.Class.Sourced HsDev.Symbols.Types.Symbol 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.Base.Monad m => Control.Monad.State.Class.MonadState (HsDev.Symbols.Types.Inspection, Data.Set.Internal.Set t) (HsDev.Symbols.Types.InspectM k t m) instance GHC.Base.Monad m => Control.Monad.Error.Class.MonadError HsDev.Types.HsDevError (HsDev.Symbols.Types.InspectM k t m) instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader k (HsDev.Symbols.Types.InspectM k t m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (HsDev.Symbols.Types.InspectM k t m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (HsDev.Symbols.Types.InspectM k t m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (HsDev.Symbols.Types.InspectM k t m) instance GHC.Base.Monad m => GHC.Base.MonadPlus (HsDev.Symbols.Types.InspectM k t m) instance GHC.Base.Monad m => GHC.Base.Monad (HsDev.Symbols.Types.InspectM k t m) instance GHC.Base.Monad m => GHC.Base.Alternative (HsDev.Symbols.Types.InspectM k t m) instance GHC.Base.Monad m => GHC.Base.Applicative (HsDev.Symbols.Types.InspectM k t m) instance GHC.Base.Functor m => GHC.Base.Functor (HsDev.Symbols.Types.InspectM k t m) instance GHC.Classes.Ord HsDev.Symbols.Types.Inspection instance GHC.Classes.Eq HsDev.Symbols.Types.Inspection instance GHC.Classes.Ord HsDev.Symbols.Types.ImportedSymbol instance GHC.Classes.Eq HsDev.Symbols.Types.ImportedSymbol instance GHC.Classes.Ord HsDev.Symbols.Types.SymbolUsage instance GHC.Classes.Eq HsDev.Symbols.Types.SymbolUsage instance GHC.Classes.Ord a => GHC.Classes.Ord (HsDev.Symbols.Types.Scoped a) instance GHC.Classes.Eq a => GHC.Classes.Eq (HsDev.Symbols.Types.Scoped a) instance GHC.Show.Show HsDev.Symbols.Types.SymbolInfo instance GHC.Read.Read HsDev.Symbols.Types.SymbolInfo instance GHC.Classes.Ord HsDev.Symbols.Types.SymbolInfo instance GHC.Classes.Eq HsDev.Symbols.Types.SymbolInfo instance GHC.Classes.Ord HsDev.Symbols.Types.Import instance GHC.Classes.Eq HsDev.Symbols.Types.Import instance GHC.Show.Show HsDev.Symbols.Types.InspectedModule instance Control.DeepSeq.NFData HsDev.Symbols.Types.ModuleTag instance HsDev.Display.Display 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 Control.Monad.Trans.Class.MonadTrans (HsDev.Symbols.Types.InspectM k t) instance (GHC.Classes.Eq k, GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (HsDev.Symbols.Types.Inspected k t a) instance (GHC.Classes.Ord k, GHC.Classes.Ord t, GHC.Classes.Ord a) => GHC.Classes.Ord (HsDev.Symbols.Types.Inspected k t a) instance GHC.Base.Functor (HsDev.Symbols.Types.Inspected k t) instance Data.Foldable.Foldable (HsDev.Symbols.Types.Inspected k t) instance Data.Traversable.Traversable (HsDev.Symbols.Types.Inspected k t) instance (Control.DeepSeq.NFData k, Control.DeepSeq.NFData t, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (HsDev.Symbols.Types.Inspected k t a) instance (Data.Aeson.Types.ToJSON.ToJSON k, Data.Aeson.Types.ToJSON.ToJSON t, Data.Aeson.Types.ToJSON.ToJSON a) => Data.Aeson.Types.ToJSON.ToJSON (HsDev.Symbols.Types.Inspected k t a) instance (Data.Aeson.Types.FromJSON.FromJSON k, GHC.Classes.Ord t, Data.Aeson.Types.FromJSON.FromJSON t, Data.Aeson.Types.FromJSON.FromJSON a) => Data.Aeson.Types.FromJSON.FromJSON (HsDev.Symbols.Types.Inspected k t a) instance Control.DeepSeq.NFData HsDev.Symbols.Types.Inspection instance GHC.Show.Show HsDev.Symbols.Types.Inspection instance GHC.Base.Semigroup HsDev.Symbols.Types.Inspection 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.Show.Show HsDev.Symbols.Types.ImportedSymbol instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.ImportedSymbol instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.ImportedSymbol instance GHC.Show.Show HsDev.Symbols.Types.SymbolUsage instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.SymbolUsage instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.SymbolUsage instance GHC.Show.Show a => GHC.Show.Show (HsDev.Symbols.Types.Scoped a) instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (HsDev.Symbols.Types.Scoped a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (HsDev.Symbols.Types.Scoped a) instance HsDev.Symbols.Types.EmptySymbolInfo HsDev.Symbols.Types.SymbolInfo instance (GHC.Base.Monoid a, HsDev.Symbols.Types.EmptySymbolInfo r) => HsDev.Symbols.Types.EmptySymbolInfo (a -> r) 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.Classes.Ord HsDev.Symbols.Types.Module instance GHC.Show.Show HsDev.Symbols.Types.Module instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Types.Module instance GHC.Classes.Eq HsDev.Symbols.Types.Symbol instance GHC.Classes.Ord HsDev.Symbols.Types.Symbol instance Control.DeepSeq.NFData HsDev.Symbols.Types.Symbol instance GHC.Show.Show HsDev.Symbols.Types.Symbol instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.Symbol instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.Symbol instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Types.Symbol instance Control.DeepSeq.NFData HsDev.Symbols.Types.SymbolInfo instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Symbols.Types.SymbolInfo instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Symbols.Types.SymbolInfo 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 l => Control.DeepSeq.NFData (Language.Haskell.Exts.Syntax.ModuleName l) instance Control.DeepSeq.NFData l => Control.DeepSeq.NFData (Language.Haskell.Exts.Syntax.Name l) instance Control.DeepSeq.NFData Language.Haskell.Exts.Syntax.Boxed instance Control.DeepSeq.NFData l => Control.DeepSeq.NFData (Language.Haskell.Exts.Syntax.SpecialCon l) instance Control.DeepSeq.NFData l => Control.DeepSeq.NFData (Language.Haskell.Exts.Syntax.QName l) instance Data.Aeson.Types.ToJSON.ToJSON (Language.Haskell.Exts.Syntax.Assoc ()) instance Data.Aeson.Types.FromJSON.FromJSON (Language.Haskell.Exts.Syntax.Assoc ()) instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.Exts.Fixity.Fixity instance Data.Aeson.Types.FromJSON.FromJSON Language.Haskell.Exts.Fixity.Fixity instance Control.DeepSeq.NFData (Language.Haskell.Exts.Syntax.Assoc ()) instance Control.DeepSeq.NFData Language.Haskell.Exts.Fixity.Fixity instance GHC.Read.Read Data.Time.Clock.Internal.POSIXTime.POSIXTime instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Location.ModuleId instance HsDev.Symbols.Documented.Documented HsDev.Symbols.Location.SymbolId module HsDev.Symbols.HaskellNames class ToEnvironment a environment :: ToEnvironment a => a -> Environment fromSymbol :: Symbol -> Symbol toSymbol :: Symbol -> Symbol instance HsDev.Symbols.HaskellNames.ToEnvironment HsDev.Symbols.Types.Module instance HsDev.Symbols.HaskellNames.ToEnvironment [HsDev.Symbols.Types.Module] module HsDev.Symbols -- | 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 Path)) -- | Make Info for standalone Module standaloneInfo :: [PackageConfig] -> Module -> Info -- | Options for GHC of module and project moduleOpts :: [PackageConfig] -> Module -> [String] -- | Options for GHC of project projectTargetOpts :: [PackageConfig] -> Project -> Info -> [String] -- | 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 -- | Set inspection tag inspectTag :: (Monad m, Ord t) => t -> InspectM k t m a -> InspectM k t m a -- | Unser inspection tag inspectUntag :: (Monad m, Ord t) => t -> InspectM k t m a -> InspectM k t m a -- | Documented symbol class Documented a brief :: Documented a => a -> Text detailed :: Documented a => a -> Text detailed :: (Documented a, Sourced a) => a -> Text 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 Symbol hayooAsSymbol :: HayooSymbol -> Maybe Symbol -- | Search hayoo hayoo :: Manager -> 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 Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Hayoo.HayooValue instance HsDev.Symbols.Class.Sourced HsDev.Tools.Hayoo.HayooSymbol instance HsDev.Symbols.Documented.Documented HsDev.Tools.Hayoo.HayooSymbol instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Tools.Hayoo.HayooSymbol module HsDev.Tools.Ghc.Types data TypedExpr TypedExpr :: Maybe Text -> Text -> TypedExpr [_typedExpr] :: TypedExpr -> Maybe Text [_typedType] :: TypedExpr -> Text typedExpr :: Lens' TypedExpr (Maybe Text) typedType :: Lens' TypedExpr Text moduleTypes :: (MonadFail m, GhcMonad m) => Path -> m [(SrcSpan, Type)] -- | Get all types in module fileTypes :: (MonadLog m, MonadFail m, GhcMonad m) => Module -> Maybe Text -> m [Note TypedExpr] -- | Set types to module setModuleTypes :: [Note TypedExpr] -> Module -> Module -- | Infer types in module inferTypes :: (MonadLog m, MonadFail m, GhcMonad m) => Module -> Maybe Text -> 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 HsDev.Tools.Ghc.Compat.TcId) instance HsDev.Tools.Ghc.Types.HasType (HsBinds.LHsBind HsDev.Tools.Ghc.Compat.TcId) instance HsDev.Tools.Ghc.Types.HasType (HsPat.LPat HsDev.Tools.Ghc.Compat.TcId) module HsDev.Symbols.Resolve type RefineTable = Map (Text, Text, SymbolInfo) Symbol refineTable :: [Symbol] -> RefineTable refineSymbol :: RefineTable -> Symbol -> Symbol refineSymbols :: RefineTable -> Module -> Module symbolUniqId :: Symbol -> (Text, Text, SymbolInfo) module HsDev.Inspect.Types -- | Preloaded module with contents and extensions data Preloaded Preloaded :: ModuleId -> ParseMode -> Module SrcSpanInfo -> Text -> Preloaded [_preloadedId] :: Preloaded -> ModuleId [_preloadedMode] :: Preloaded -> ParseMode -- | Loaded module head without declarations [_preloadedModule] :: Preloaded -> Module SrcSpanInfo [_preloaded] :: Preloaded -> Text preloadedId :: Lens' Preloaded ModuleId preloadedMode :: Lens' Preloaded ParseMode preloadedModule :: Lens' Preloaded (Module SrcSpanInfo) asModule :: Lens' Preloaded Module toImport :: ImportDecl SrcSpanInfo -> Import preloaded :: Lens' Preloaded Text type InspectedPreloaded = Inspected ModuleLocation ModuleTag Preloaded -- | Symbols environment, used to resolve names in source type Environment = Environment -- | Fixities environment, needed to parse source type FixitiesTable = Map Name Fixity -- | Resolved module data Resolved Resolved :: ModuleName () -> Parsed -> [Symbol] -> [Import] -> [Symbol] -> Table -> [Fixity] -> Resolved [_resolvedModule] :: Resolved -> ModuleName () [_resolvedSource] :: Resolved -> Parsed [_resolvedDefs] :: Resolved -> [Symbol] [_resolvedImports] :: Resolved -> [Import] [_resolvedExports] :: Resolved -> [Symbol] [_resolvedScope] :: Resolved -> Table [_resolvedFixities] :: Resolved -> [Fixity] resolvedModule :: Lens' Resolved (ModuleName ()) resolvedSource :: Lens' Resolved Parsed resolvedDefs :: Lens' Resolved [Symbol] resolvedImports :: Lens' Resolved [Import] resolvedExports :: Lens' Resolved [Symbol] resolvedScope :: Lens' Resolved Table resolvedFixities :: Lens' Resolved [Fixity] -- | Like InspectedModule, but for Resolved type InspectedResolved = Inspected ModuleLocation ModuleTag Resolved -- | Get environment for resolved module resolvedEnv :: Resolved -> Environment -- | Get fixities table from resolved module resolvedFixitiesTable :: Resolved -> FixitiesTable -- | Drop extra info dropScope :: Functor f => f (Scoped l) -> f l -- | Empty scope info noScope :: l -> Scoped l -- | Set empty scope withNoScope :: Functor f => f l -> f (Scoped l) instance Control.DeepSeq.NFData HsDev.Inspect.Types.Resolved instance Control.DeepSeq.NFData HsDev.Inspect.Types.Preloaded module HsDev.Inspect.Definitions -- | Get top symbols getSymbols :: [Decl Ann] -> [Symbol] -- | Get symbols from declarations getDecl :: Decl Ann -> [Symbol] module HsDev.PackageDb -- | Get path to package-db packageDbPath :: PackageDb -> IO Path -- | Read package-db conf files readPackageDb :: PackageDb -> IO (Map ModulePackage [ModuleLocation]) module HsDev.Tools.Ghc.Check -- | Check module source check :: (MonadLog m, GhcMonad m) => Module -> Maybe Text -> 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 :: Path -> PackageDb [_packageDb] :: PackageDb -> Path -- | Stack of PackageDb in reverse order newtype PackageDbStack PackageDbStack :: [PackageDb] -> PackageDbStack [_packageDbStack] :: PackageDbStack -> [PackageDb] -- | Cabal project data Project Project :: Text -> Path -> Path -> Maybe ProjectDescription -> BuildTool -> Maybe PackageDbStack -> Project [_projectName] :: Project -> Text [_projectPath] :: Project -> Path [_projectCabal] :: Project -> Path [_projectDescription] :: Project -> Maybe ProjectDescription [_projectBuildTool] :: Project -> BuildTool [_projectPackageDbStack] :: Project -> Maybe PackageDbStack module HsDev.Stack -- | Invoke stack command, we are trying to get actual stack near current -- hsdev executable stack :: [String] -> GhcM String -- | Make yaml opts yaml :: Maybe FilePath -> [String] -- | Stack path path :: Maybe FilePath -> GhcM PathsConf -- | Get path for pathOf :: String -> Lens' PathsConf (Maybe FilePath) -- | Build stack project build :: [String] -> Maybe FilePath -> GhcM () -- | Build only dependencies buildDeps :: Maybe FilePath -> GhcM () 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 :: PathsConf -> Maybe StackEnv -- | Projects paths projectEnv :: FilePath -> GhcM StackEnv -- | Get package-db stack for stack environment stackPackageDbStack :: Lens' StackEnv PackageDbStack -- | Get compiler version stackCompiler :: GhcM 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 :: Type -> Type) a MaybeT :: m (Maybe a) -> MaybeT a [runMaybeT] :: MaybeT a -> m (Maybe a) module HsDev.Scan.Browse -- | Browse packages browsePackages :: [String] -> PackageDbStack -> GhcM [PackageConfig] -- | Get packages with deps browsePackagesDeps :: [String] -> PackageDbStack -> GhcM (Deps PackageConfig) -- | List modules from ghc, accepts ghc-opts, stack of package-db to get -- modules for and list of packages to explicitely expose them with -- '-package' flag, otherwise hidden packages won't be loaded listModules :: [String] -> PackageDbStack -> [ModulePackage] -> GhcM [ModuleLocation] -- | Like browseModules, but groups modules by package and -- inspects each package separately Trying to fix error: when there are -- several same packages (of different version), only Module -- from one of them can be lookuped and therefore modules from different -- version packages won't be actually inspected browseModules :: [String] -> PackageDbStack -> [ModuleLocation] -> GhcM [InspectedModule] -- | Inspect installed modules, doesn't set session and package flags! browseModules' :: [String] -> [ModuleLocation] -> GhcM [InspectedModule] -- | There can be same modules (same package name, version and module name) -- installed in different locations Select first one of such modules uniqueModuleLocations :: [ModuleLocation] -> [ModuleLocation] readPackage :: PackageConfig -> ModulePackage readPackageConfig :: PackageConfig -> PackageConfig ghcModuleLocation :: PackageConfig -> Module -> Bool -> ModuleLocation packageConfigs :: GhcM [PackageConfig] packageDbModules :: GhcM [(PackageConfig, Module, Bool)] lookupModule_ :: DynFlags -> ModuleName -> [Module] -- | Get modules packages modulesPackages :: [ModuleLocation] -> [ModulePackage] -- | Group modules by packages modulesPackagesGroups :: [ModuleLocation] -> [(ModulePackage, [ModuleLocation])] -- | Run action for each package with prepared '-package' flags withEachPackage :: (ModulePackage -> [ModuleLocation] -> GhcM a) -> [ModuleLocation] -> GhcM [a] module HsDev.Tools.HDocs -- | Get docs for modules hdocsy :: PackageDbStack -> [ModuleLocation] -> [String] -> GhcM [Map String String] -- | Get docs for module hdocs :: PackageDbStack -> ModuleLocation -> [String] -> GhcM (Map String String) -- | Get docs for package hdocsPackage :: PackageConfig -> GhcM (Map Text (Map Text Text)) -- | Get all docs hdocsCabal :: PackageDbStack -> [String] -> GhcM [(ModulePackage, Map Text (Map Text Text))] -- | Set docs for module setSymbolDocs :: MonadIO m => LookupTable (Text, Text) (Maybe Text) -> Map Text Text -> Symbol -> m Symbol -- | Set docs for module symbols setDocs :: MonadIO m => LookupTable (Text, Text) (Maybe Text) -> Map Text Text -> Module -> m Module -- | Set docs for modules setModuleDocs :: MonadIO m => LookupTable (Text, Text) (Maybe Text) -> Map Text (Map Text Text) -> Module -> m Module hdocsProcess :: String -> [String] -> IO (Maybe (Map String String)) -- | Read docs for one module readDocs :: Text -> [String] -> Path -> GhcM (Maybe (Map String String)) -- | Read docs for one module readModuleDocs :: [String] -> Module -> GhcM (Maybe (Map String String)) readProjectTargetDocs :: [String] -> Project -> [Path] -> GhcM (Map String (Map String String)) hdocsSupported :: Bool module HsDev.Sandbox data Sandbox Sandbox :: BuildTool -> Path -> Sandbox [_sandboxType] :: Sandbox -> BuildTool [_sandbox] :: Sandbox -> Path sandboxType :: Lens' Sandbox BuildTool sandbox :: Lens' Sandbox Path isSandbox :: Path -> Bool guessSandboxType :: Path -> Maybe BuildTool sandboxFromPath :: Path -> Maybe Sandbox -- | Find sandbox in path findSandbox :: Path -> IO (Maybe Sandbox) -- | Search sandbox by parent directory searchSandbox :: Path -> IO (Maybe Sandbox) -- | Search sandboxes up from current directory searchSandboxes :: Path -> IO [Sandbox] -- | Get project sandbox: search up for .cabal, then search for stack.yaml -- in current directory and cabal sandbox in current + parents projectSandbox :: BuildTool -> Path -> IO (Maybe Sandbox) -- | Get package-db stack for sandbox sandboxPackageDbStack :: Sandbox -> GhcM PackageDbStack -- | Search package-db stack with user-db as default searchPackageDbStack :: BuildTool -> Path -> GhcM PackageDbStack -- | Restore package-db stack by package-db restorePackageDbStack :: PackageDb -> GhcM PackageDbStack -- | User package-db: arch-os-version userPackageDb :: GhcM FilePath -- | Get sandbox package-db: -- arch-os-compiler-version-packages.conf.d cabalSandboxPackageDb :: FilePath -> GhcM FilePath -- | Options for GHC for module and project getModuleOpts :: [String] -> Module -> GhcM (PackageDbStack, [String]) -- | Options for GHC for project target getProjectTargetOpts :: [String] -> Project -> Info -> GhcM (PackageDbStack, [String]) -- | Get sandbox of project (if any) getProjectSandbox :: MonadLog m => Project -> m (Maybe Sandbox) -- | Get project package-db stack getProjectPackageDbStack :: Project -> GhcM PackageDbStack module HsDev.Tools.Ghc.Session -- | Session for module targetSession :: [String] -> Module -> GhcM () -- | Interpret file interpretModule :: Module -> Maybe Text -> GhcM () module HsDev.Database.SQLite.Instances newtype JSON a JSON :: a -> JSON a [getJSON] :: JSON a -> a instance GHC.Show.Show a => GHC.Show.Show (HsDev.Database.SQLite.Instances.JSON a) instance GHC.Read.Read a => GHC.Read.Read (HsDev.Database.SQLite.Instances.JSON a) instance GHC.Classes.Ord a => GHC.Classes.Ord (HsDev.Database.SQLite.Instances.JSON a) instance GHC.Classes.Eq a => GHC.Classes.Eq (HsDev.Database.SQLite.Instances.JSON a) instance Data.Aeson.Types.ToJSON.ToJSON a => Database.SQLite.Simple.ToField.ToField (HsDev.Database.SQLite.Instances.JSON a) instance Data.Aeson.Types.FromJSON.FromJSON a => Database.SQLite.Simple.FromField.FromField (HsDev.Database.SQLite.Instances.JSON a) instance Database.SQLite.Simple.ToField.ToField Data.Aeson.Types.Internal.Value instance Database.SQLite.Simple.FromField.FromField Data.Aeson.Types.Internal.Value instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Location.Position instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Location.Position instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Location.Region instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Location.Region instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Location.ModulePackage instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Location.ModulePackage instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Location.ModuleLocation instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Location.ModuleLocation instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Location.ModuleId instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Location.ModuleId instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Types.Import instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Types.Import instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Location.SymbolId instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Location.SymbolId instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Types.SymbolInfo instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Types.SymbolInfo instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Types.Symbol instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Types.Symbol instance Database.SQLite.Simple.FromRow.FromRow a => Database.SQLite.Simple.FromRow.FromRow (HsDev.Symbols.Types.Scoped a) instance Database.SQLite.Simple.ToRow.ToRow a => Database.SQLite.Simple.ToRow.ToRow (HsDev.Symbols.Types.Scoped a) instance Database.SQLite.Simple.ToField.ToField HsDev.Project.Types.BuildTool instance Database.SQLite.Simple.FromField.FromField HsDev.Project.Types.BuildTool instance Database.SQLite.Simple.ToRow.ToRow HsDev.Project.Types.Sandbox instance Database.SQLite.Simple.FromRow.FromRow HsDev.Project.Types.Sandbox instance Database.SQLite.Simple.ToRow.ToRow HsDev.Project.Types.Project instance Database.SQLite.Simple.FromRow.FromRow HsDev.Project.Types.Project instance Database.SQLite.Simple.FromRow.FromRow HsDev.Project.Types.Library instance Database.SQLite.Simple.FromRow.FromRow HsDev.Project.Types.Executable instance Database.SQLite.Simple.FromRow.FromRow HsDev.Project.Types.Test instance Database.SQLite.Simple.FromRow.FromRow HsDev.Project.Types.Info instance Database.SQLite.Simple.FromField.FromField Language.Haskell.Extension.Language instance Database.SQLite.Simple.ToField.ToField HsDev.PackageDb.Types.PackageDb instance Database.SQLite.Simple.FromField.FromField HsDev.PackageDb.Types.PackageDb instance Database.SQLite.Simple.ToField.ToField HsDev.PackageDb.Types.PackageDbStack instance Database.SQLite.Simple.FromField.FromField HsDev.PackageDb.Types.PackageDbStack instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Types.SymbolUsage instance Database.SQLite.Simple.FromField.FromField Data.Time.Clock.Internal.POSIXTime.POSIXTime instance Database.SQLite.Simple.ToField.ToField Data.Time.Clock.Internal.POSIXTime.POSIXTime instance Database.SQLite.Simple.FromRow.FromRow HsDev.Symbols.Types.Inspection instance Database.SQLite.Simple.ToRow.ToRow HsDev.Symbols.Types.Inspection instance Database.SQLite.Simple.FromRow.FromRow HsDev.Tools.Ghc.Types.TypedExpr instance Database.SQLite.Simple.ToRow.ToRow HsDev.Tools.Ghc.Types.TypedExpr instance Database.SQLite.Simple.FromField.FromField (Language.Haskell.Exts.Syntax.Name ()) instance Database.SQLite.Simple.ToField.ToField (Language.Haskell.Exts.Syntax.Name ()) instance Database.SQLite.Simple.FromField.FromField (Language.Haskell.Exts.Syntax.ModuleName ()) instance Database.SQLite.Simple.ToField.ToField (Language.Haskell.Exts.Syntax.ModuleName ()) instance Database.SQLite.Simple.FromRow.FromRow Language.Haskell.Names.Types.Symbol instance Database.SQLite.Simple.ToRow.ToRow Language.Haskell.Names.Types.Symbol instance Database.SQLite.Simple.FromField.FromField HsDev.Tools.Types.Severity instance Database.SQLite.Simple.ToField.ToField HsDev.Tools.Types.Severity instance Database.SQLite.Simple.FromRow.FromRow HsDev.Tools.Types.OutputMessage instance Database.SQLite.Simple.ToRow.ToRow HsDev.Tools.Types.OutputMessage instance Database.SQLite.Simple.FromRow.FromRow a => Database.SQLite.Simple.FromRow.FromRow (HsDev.Tools.Types.Note a) instance Database.SQLite.Simple.ToRow.ToRow a => Database.SQLite.Simple.ToRow.ToRow (HsDev.Tools.Types.Note a) 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 event group eventGroup :: Watcher a -> NominalDiffTime -> ([(a, Event)] -> IO ()) -> IO () -- | Process all events onEvents :: Watcher a -> NominalDiffTime -> ([(a, Event)] -> IO ()) -> IO () -- | Process all events onEvents_ :: Watcher a -> ([(a, Event)] -> IO ()) -> IO () instance GHC.Show.Show System.Directory.Watcher.Event instance GHC.Classes.Ord System.Directory.Watcher.Event instance GHC.Classes.Eq System.Directory.Watcher.Event 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 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.Server.Types type ServerMonadBase m = (MonadIO m, MonadFail m, MonadMask m, MonadBaseControl IO m, Alternative m, MonadPlus m) data SessionLog SessionLog :: Log -> IO [Message] -> IO () -> SessionLog [sessionLogger] :: SessionLog -> Log [sessionListenLog] :: SessionLog -> IO [Message] [sessionLogWait] :: SessionLog -> IO () data Session Session :: Connection -> String -> SessionLog -> Maybe Watcher -> (Path -> Maybe Text -> IO ()) -> GhcWorker -> Worker (ServerM IO) -> LookupTable (Maybe Path) (Environment, FixitiesTable) -> Manager -> IO () -> IO () -> Chan (IO ()) -> [(String, String)] -> Session [sessionSqlDatabase] :: Session -> Connection [sessionSqlPath] :: Session -> String [sessionLog] :: Session -> SessionLog [sessionWatcher] :: Session -> Maybe Watcher [sessionFileContents] :: Session -> Path -> Maybe Text -> IO () [sessionGhc] :: Session -> GhcWorker [sessionUpdater] :: Session -> Worker (ServerM IO) [sessionResolveEnvironment] :: Session -> LookupTable (Maybe Path) (Environment, FixitiesTable) [sessionHTTPManager] :: Session -> Manager [sessionExit] :: Session -> IO () [sessionWait] :: Session -> IO () [sessionClients] :: Session -> Chan (IO ()) [sessionDefines] :: Session -> [(String, String)] class (ServerMonadBase m, MonadLog m) => SessionMonad m getSession :: SessionMonad m => m Session localSession :: SessionMonad m => (Session -> Session) -> m a -> m a 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 [Message] -- | Set server's log config serverSetLogLevel :: SessionMonad m => Level -> m Level -- | Wait for server serverWait :: SessionMonad m => m () -- | Wait while clients disconnects serverWaitClients :: SessionMonad m => m () -- | Get sql connection serverSqlDatabase :: SessionMonad m => m Connection -- | Open new sql connection openSqlConnection :: SessionMonad m => m Connection -- | Close sql connection closeSqlConnection :: SessionMonad m => Connection -> m () -- | Locally opens new connection, updating Session withSqlConnection :: SessionMonad m => m a -> m a -- | With sql transaction withSqlTransaction :: SessionMonad m => ServerM IO a -> m a -- | Set custom file contents serverSetFileContents :: SessionMonad m => Path -> Maybe Text -> m () -- | In ghc session inSessionGhc :: SessionMonad m => GhcM a -> m a -- | In updater inSessionUpdater :: SessionMonad m => ServerM IO a -> m a -- | Post to updater and return postSessionUpdater :: SessionMonad m => ServerM IO a -> m (Async 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 :: Bool -> 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 -> Bool -> Maybe FilePath -> Bool -> Bool -> ServerOpts [serverPort] :: ServerOpts -> ConnectionPort [serverTimeout] :: ServerOpts -> Int [serverLog] :: ServerOpts -> Maybe FilePath [serverLogLevel] :: ServerOpts -> String [serverLogNoColor] :: ServerOpts -> Bool [serverDbFile] :: ServerOpts -> Maybe FilePath [serverWatchFS] :: 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 Scan :: [Path] -> Bool -> [Path] -> [FileSource] -> [Path] -> BuildTool -> [String] -> Bool -> Bool -> Command [scanProjects] :: Command -> [Path] [scanCabal] :: Command -> Bool [scanSandboxes] :: Command -> [Path] [scanFiles] :: Command -> [FileSource] [scanPaths] :: Command -> [Path] [scanBuildTool] :: Command -> BuildTool [scanGhcOpts] :: Command -> [String] [scanDocs] :: Command -> Bool [scanInferTypes] :: Command -> Bool ScanProject :: Path -> BuildTool -> Bool -> Command [scanProjectPath] :: Command -> Path [scanProjectBuildTool] :: Command -> BuildTool [scanProjectDeps] :: Command -> Bool ScanFile :: Path -> BuildTool -> Bool -> Bool -> Command [scanFilePath] :: Command -> Path [scanFileBuildTool] :: Command -> BuildTool [scanFileProject] :: Command -> Bool [scanFileDeps] :: Command -> Bool ScanPackageDbs :: PackageDbStack -> Command [scanPackageDbStack] :: Command -> PackageDbStack SetFileContents :: Path -> Maybe Text -> Command RefineDocs :: [Path] -> [Path] -> Command [docsProjects] :: Command -> [Path] [docsFiles] :: Command -> [Path] InferTypes :: [Path] -> [Path] -> Command [inferProjects] :: Command -> [Path] [inferFiles] :: Command -> [Path] Remove :: [Path] -> Bool -> [Path] -> [Path] -> Command [removeProjects] :: Command -> [Path] [removeCabal] :: Command -> Bool [removeSandboxes] :: Command -> [Path] [removeFiles] :: Command -> [Path] RemoveAll :: Command InfoPackages :: Command InfoProjects :: Command InfoSandboxes :: Command InfoSymbol :: SearchQuery -> [TargetFilter] -> Bool -> Bool -> Command InfoModule :: SearchQuery -> [TargetFilter] -> Bool -> Bool -> Command InfoProject :: Either Text Path -> Command InfoSandbox :: Path -> Command Lookup :: Text -> Path -> Command Whois :: Text -> Path -> Command Whoat :: Int -> Int -> Path -> Command ResolveScopeModules :: SearchQuery -> Path -> Command ResolveScope :: SearchQuery -> Path -> Command FindUsages :: Int -> Int -> Path -> Command Complete :: Text -> Bool -> Path -> Command Hayoo :: String -> Int -> Int -> Command [hayooQuery] :: Command -> String [hayooPage] :: Command -> Int [hayooPages] :: Command -> Int CabalList :: [Text] -> Command [cabalListPackages] :: Command -> [Text] UnresolvedSymbols :: [Path] -> Command [unresolvedFiles] :: Command -> [Path] Lint :: [FileSource] -> [String] -> Command [lintFiles] :: Command -> [FileSource] [lintHlintOpts] :: Command -> [String] Check :: [FileSource] -> [String] -> Bool -> Command [checkFiles] :: Command -> [FileSource] [checkGhcOpts] :: Command -> [String] [checkClear] :: Command -> Bool CheckLint :: [FileSource] -> [String] -> [String] -> Bool -> Command [checkLintFiles] :: Command -> [FileSource] [checkLintGhcOpts] :: Command -> [String] [checkLintOpts] :: Command -> [String] [checkLinkClear] :: Command -> Bool Types :: [FileSource] -> [String] -> Bool -> Command [typesFiles] :: Command -> [FileSource] [typesGhcOpts] :: Command -> [String] [typesClear] :: Command -> Bool AutoFix :: [Note OutputMessage] -> Command Refactor :: [Note Refact] -> [Note Refact] -> Bool -> Command Rename :: Text -> Text -> Maybe (Int, Int) -> Path -> Command [renameSymbol] :: Command -> Text [renameTo] :: Command -> Text [renameLocal] :: Command -> Maybe (Int, Int) [renameContextFile] :: Command -> Path GhcEval :: [String] -> Maybe FileSource -> Command [ghcEvalExpressions] :: Command -> [String] [ghcEvalSource] :: Command -> Maybe FileSource GhcType :: [String] -> Maybe FileSource -> Command [ghcTypeExpressions] :: Command -> [String] [ghcTypeSource] :: Command -> Maybe FileSource Langs :: Command Flags :: Command Link :: Bool -> Command [linkHold] :: Command -> Bool StopGhc :: Command Exit :: Command data FileSource FileSource :: Path -> Maybe Text -> FileSource [fileSource] :: FileSource -> Path [fileContents] :: FileSource -> Maybe Text data TargetFilter TargetProject :: Text -> TargetFilter TargetFile :: Path -> TargetFilter TargetModule :: Text -> TargetFilter TargetPackage :: Text -> TargetFilter TargetInstalled :: TargetFilter TargetSourced :: TargetFilter TargetStandalone :: TargetFilter data SearchQuery SearchQuery :: Text -> SearchType -> SearchQuery data SearchType SearchExact :: SearchType SearchPrefix :: SearchType SearchInfix :: SearchType SearchSuffix :: 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.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 Control.Monad.Fail.MonadFail m => Control.Monad.Fail.MonadFail (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 Control.Monad.Fail.MonadFail m => Control.Monad.Fail.MonadFail (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 HsDev.Util.FromCmd HsDev.Server.Types.ServerCommand instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.Request instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.Request instance System.Directory.Paths.Paths HsDev.Server.Types.Command instance HsDev.Util.FromCmd HsDev.Server.Types.Command instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.Command instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.Command instance HsDev.Util.FromCmd HsDev.Server.Types.SearchQuery 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 instance System.Directory.Paths.Paths HsDev.Server.Types.TargetFilter instance HsDev.Util.FromCmd HsDev.Server.Types.TargetFilter instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.TargetFilter instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.TargetFilter instance System.Directory.Paths.Paths HsDev.Server.Types.FileSource instance HsDev.Util.FromCmd HsDev.Server.Types.FileSource instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Server.Types.FileSource instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Server.Types.FileSource instance Data.Default.Class.Default HsDev.Server.Types.ClientOpts instance HsDev.Util.FromCmd HsDev.Server.Types.ClientOpts instance Data.Default.Class.Default HsDev.Server.Types.ServerOpts instance HsDev.Util.FromCmd HsDev.Server.Types.ServerOpts 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 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 Control.Monad.Morph.MFunctor HsDev.Server.Types.ClientM instance HsDev.Server.Types.CommandMonad m => HsDev.Server.Types.CommandMonad (Control.Monad.Trans.Reader.ReaderT r m) instance (HsDev.Server.Types.CommandMonad m, GHC.Base.Monoid w) => HsDev.Server.Types.CommandMonad (Control.Monad.Trans.Writer.Lazy.WriterT w m) instance HsDev.Server.Types.CommandMonad m => HsDev.Server.Types.CommandMonad (Control.Monad.Trans.State.Lazy.StateT s m) instance Data.Default.Class.Default HsDev.Server.Types.CommandOptions instance HsDev.Server.Types.ServerMonadBase m => HsDev.Server.Types.SessionMonad (HsDev.Server.Types.ServerM m) instance HsDev.Server.Types.SessionMonad m => HsDev.Server.Types.SessionMonad (Control.Monad.Trans.Reader.ReaderT r m) instance (HsDev.Server.Types.SessionMonad m, GHC.Base.Monoid w) => HsDev.Server.Types.SessionMonad (Control.Monad.Trans.Writer.Lazy.WriterT w m) instance HsDev.Server.Types.SessionMonad m => HsDev.Server.Types.SessionMonad (Control.Monad.Trans.State.Lazy.StateT s m) instance (Control.Monad.IO.Class.MonadIO m, Control.Monad.Catch.MonadMask m) => System.Log.Simple.Monad.MonadLog (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 Control.Monad.Morph.MFunctor HsDev.Server.Types.ServerM 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 updateTasks :: Lens' UpdateOptions [Task] updateGhcOpts :: Lens' UpdateOptions [String] updateDocs :: Lens' UpdateOptions Bool updateInfer :: Lens' UpdateOptions Bool data UpdateState UpdateState :: UpdateOptions -> Worker (ServerM IO) -> UpdateState [_updateOptions] :: UpdateState -> UpdateOptions [_updateWorker] :: UpdateState -> Worker (ServerM IO) updateOptions :: Lens' UpdateState UpdateOptions updateWorker :: Lens' UpdateState (Worker (ServerM IO)) withUpdateState :: SessionMonad m => UpdateOptions -> (UpdateState -> m a) -> m a sendUpdateAction :: UpdateMonad m => ServerM IO () -> m () newtype UpdateM m a UpdateM :: ReaderT UpdateState (WriterT [ModuleLocation] (ClientM m)) a -> UpdateM m a [runUpdateM] :: UpdateM m a -> ReaderT UpdateState (WriterT [ModuleLocation] (ClientM m)) a type UpdateMonad m = (CommandMonad m, MonadReader UpdateState 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) class FromCmd a cmdP :: FromCmd a => Parser a data SearchType SearchExact :: SearchType SearchPrefix :: SearchType SearchInfix :: SearchType SearchSuffix :: SearchType data SearchQuery SearchQuery :: Text -> SearchType -> SearchQuery data TargetFilter TargetProject :: Text -> TargetFilter TargetFile :: Path -> TargetFilter TargetModule :: Text -> TargetFilter TargetPackage :: Text -> TargetFilter TargetInstalled :: TargetFilter TargetSourced :: TargetFilter TargetStandalone :: TargetFilter data FileSource FileSource :: Path -> Maybe Text -> FileSource [fileSource] :: FileSource -> Path [fileContents] :: FileSource -> Maybe Text data Request Request :: Command -> FilePath -> Bool -> Int -> Bool -> Request [requestCommand] :: Request -> Command [requestDirectory] :: Request -> FilePath [requestNoFile] :: Request -> Bool [requestTimeout] :: Request -> Int [requestSilent] :: Request -> 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 -- | Server options data ServerOpts ServerOpts :: ConnectionPort -> Int -> Maybe FilePath -> String -> Bool -> Maybe FilePath -> Bool -> Bool -> ServerOpts [serverPort] :: ServerOpts -> ConnectionPort [serverTimeout] :: ServerOpts -> Int [serverLog] :: ServerOpts -> Maybe FilePath [serverLogLevel] :: ServerOpts -> String [serverLogNoColor] :: ServerOpts -> Bool [serverDbFile] :: ServerOpts -> Maybe FilePath [serverWatchFS] :: ServerOpts -> Bool [serverSilent] :: ServerOpts -> Bool data ConnectionPort NetworkPort :: Int -> ConnectionPort UnixPort :: String -> ConnectionPort -- | Server control command data ServerCommand Version :: Bool -> ServerCommand Start :: ServerOpts -> ServerCommand Run :: ServerOpts -> ServerCommand Stop :: ClientOpts -> ServerCommand Connect :: ClientOpts -> ServerCommand Remote :: ClientOpts -> Bool -> Command -> ServerCommand newtype ClientM m a ClientM :: ServerM (ReaderT CommandOptions m) a -> ClientM m a [runClientM] :: ClientM m a -> ServerM (ReaderT CommandOptions m) a class (SessionMonad m, MonadPlus m) => CommandMonad m getOptions :: CommandMonad m => m CommandOptions data CommandOptions CommandOptions :: FilePath -> (Notification -> IO ()) -> IO () -> IO () -> CommandOptions [commandOptionsRoot] :: CommandOptions -> FilePath [commandOptionsNotify] :: CommandOptions -> Notification -> IO () [commandOptionsLink] :: CommandOptions -> IO () [commandOptionsHold] :: CommandOptions -> IO () newtype ServerM m a ServerM :: ReaderT Session m a -> ServerM m a [runServerM] :: ServerM m a -> ReaderT Session m a class (ServerMonadBase m, MonadLog m) => SessionMonad m getSession :: SessionMonad m => m Session localSession :: SessionMonad m => (Session -> Session) -> m a -> m a data Session Session :: Connection -> String -> SessionLog -> Maybe Watcher -> (Path -> Maybe Text -> IO ()) -> GhcWorker -> Worker (ServerM IO) -> LookupTable (Maybe Path) (Environment, FixitiesTable) -> Manager -> IO () -> IO () -> Chan (IO ()) -> [(String, String)] -> Session [sessionSqlDatabase] :: Session -> Connection [sessionSqlPath] :: Session -> String [sessionLog] :: Session -> SessionLog [sessionWatcher] :: Session -> Maybe Watcher [sessionFileContents] :: Session -> Path -> Maybe Text -> IO () [sessionGhc] :: Session -> GhcWorker [sessionUpdater] :: Session -> Worker (ServerM IO) [sessionResolveEnvironment] :: Session -> LookupTable (Maybe Path) (Environment, FixitiesTable) [sessionHTTPManager] :: Session -> Manager [sessionExit] :: Session -> IO () [sessionWait] :: Session -> IO () [sessionClients] :: Session -> Chan (IO ()) [sessionDefines] :: Session -> [(String, String)] data SessionLog SessionLog :: Log -> IO [Message] -> IO () -> SessionLog [sessionLogger] :: SessionLog -> Log [sessionListenLog] :: SessionLog -> IO [Message] [sessionLogWait] :: SessionLog -> IO () type ServerMonadBase m = (MonadIO m, MonadFail m, MonadMask m, MonadBaseControl IO m, Alternative m, MonadPlus m) askSession :: SessionMonad m => (Session -> a) -> m a askOptions :: CommandMonad m => (CommandOptions -> a) -> m a -- | Run action on session withSession :: Session -> ServerM m a -> m a -- | Listen server's log serverListen :: SessionMonad m => m [Message] -- | Set server's log config serverSetLogLevel :: SessionMonad m => Level -> m Level -- | Wait for server serverWait :: SessionMonad m => m () -- | Wait while clients disconnects serverWaitClients :: SessionMonad m => m () -- | Get sql connection serverSqlDatabase :: SessionMonad m => m Connection -- | Open new sql connection openSqlConnection :: SessionMonad m => m Connection -- | Close sql connection closeSqlConnection :: SessionMonad m => Connection -> m () -- | Locally opens new connection, updating Session withSqlConnection :: SessionMonad m => m a -> m a -- | With sql transaction withSqlTransaction :: SessionMonad m => ServerM IO a -> m a -- | Set custom file contents serverSetFileContents :: SessionMonad m => Path -> Maybe Text -> m () -- | In ghc session inSessionGhc :: SessionMonad m => GhcM a -> m a -- | In updater inSessionUpdater :: SessionMonad m => ServerM IO a -> m a -- | Post to updater and return postSessionUpdater :: SessionMonad m => ServerM IO a -> m (Async 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 () -- | Silent server with no connection, useful for ghci silentOpts :: ServerOpts serverOptsArgs :: ServerOpts -> [String] 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.UpdateState (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 Control.Monad.Fail.MonadFail m => Control.Monad.Fail.MonadFail (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.Default.Class.Default HsDev.Database.Update.Types.UpdateOptions instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Database.Update.Types.Task instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Database.Update.Types.Task instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Database.Update.Types.Progress instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Database.Update.Types.Progress instance Data.Aeson.Types.ToJSON.ToJSON HsDev.Database.Update.Types.Status instance Data.Aeson.Types.FromJSON.FromJSON HsDev.Database.Update.Types.Status module HsDev.Database.SQLite.Transaction -- | Three types of transactions data TransactionType Deferred :: TransactionType Immediate :: TransactionType Exclusive :: TransactionType -- | Retry config data Retries Retries :: [Int] -> (SQLError -> Bool) -> Retries [retriesIntervals] :: Retries -> [Int] [retriesError] :: Retries -> SQLError -> Bool -- | The default value for this type. def :: Default a => a -- | Don't retry noRetry :: Retries -- | Retry forever retryForever :: Int -> Retries -- | Retry with interval N times retryN :: Int -> Int -> Retries -- | Run actions inside transaction withTransaction :: (MonadIO m, MonadMask m) => Connection -> TransactionType -> Retries -> m a -> m a -- | Begin transaction beginTransaction :: MonadIO m => Connection -> TransactionType -> m () -- | Commit transaction commitTransaction :: MonadIO m => Connection -> m () -- | Rollback transaction rollbackTransaction :: MonadIO m => Connection -> m () -- | Run transaction in SessionMonad transaction :: SessionMonad m => TransactionType -> Retries -> m a -> m a -- | Transaction with default retries config transaction_ :: SessionMonad m => TransactionType -> m a -> m a -- | Retry operation retry :: (MonadIO m, MonadCatch m) => Retries -> m a -> m a -- | Retry with default params retry_ :: (MonadIO m, MonadCatch m) => m a -> m a instance GHC.Show.Show HsDev.Database.SQLite.Transaction.TransactionType instance GHC.Read.Read HsDev.Database.SQLite.Transaction.TransactionType instance GHC.Classes.Ord HsDev.Database.SQLite.Transaction.TransactionType instance GHC.Classes.Eq HsDev.Database.SQLite.Transaction.TransactionType instance Data.Default.Class.Default HsDev.Database.SQLite.Transaction.Retries module HsDev.Database.SQLite -- | Initialize database initialize :: String -> IO Connection purge :: SessionMonad m => m () -- | Private memory for db privateMemory :: String -- | Shared db in memory sharedMemory :: String query :: (ToRow q, FromRow r, SessionMonad m) => Query -> q -> m [r] query_ :: (FromRow r, SessionMonad m) => Query -> m [r] queryNamed :: (FromRow r, SessionMonad m) => Query -> [NamedParam] -> m [r] execute :: (ToRow q, SessionMonad m) => Query -> q -> m () execute_ :: SessionMonad m => Query -> m () executeMany :: (ToRow q, SessionMonad m) => Query -> [q] -> m () executeNamed :: SessionMonad m => Query -> [NamedParam] -> m () withTemporaryTable :: SessionMonad m => String -> [String] -> m a -> m a updatePackageDb :: SessionMonad m => PackageDb -> [ModulePackage] -> m () removePackageDb :: SessionMonad m => PackageDb -> m () insertPackageDb :: SessionMonad m => PackageDb -> [ModulePackage] -> m () updateProject :: SessionMonad m => Project -> m () removeProject :: SessionMonad m => Project -> m () insertProject :: SessionMonad m => Project -> m () insertBuildInfo :: SessionMonad m => Info -> m Int removeModuleContents :: SessionMonad m => Int -> m () removeModule :: SessionMonad m => Int -> m () lookupModuleLocation :: SessionMonad m => ModuleLocation -> m (Maybe Int) lookupModule :: SessionMonad m => ModuleId -> m (Maybe Int) lookupSymbol :: SessionMonad m => Int -> SymbolId -> m (Maybe Int) lastRow :: SessionMonad m => m Int loadModule :: SessionMonad m => Int -> m Module loadModules :: (SessionMonad m, ToRow q) => String -> q -> m [Module] loadProject :: SessionMonad m => Path -> m Project -- | Update a bunch of modules updateModules :: SessionMonad m => [InspectedModule] -> m () upsertModules :: SessionMonad m => [InspectedModule] -> m [Int] lookupId :: SessionMonad m => ModuleLocation -> m Int escapeLike :: Text -> Text -- | The 1-tuple type or single-value "collection". -- -- This type is structurally equivalent to the Identity type, but -- its intent is more about serving as the anonymous 1-tuple type missing -- from Haskell for attaching typeclass instances. -- -- Parameter usage example: -- --
--   encodeSomething (Only (42::Int))
--   
-- -- Result usage example: -- --
--   xs <- decodeSomething
--   forM_ xs $ \(Only id) -> {- ... -}
--   
newtype Only a Only :: a -> Only a [fromOnly] :: Only a -> a data SQLData SQLInteger :: !Int64 -> SQLData SQLFloat :: !Double -> SQLData SQLText :: !Text -> SQLData SQLBlob :: !ByteString -> SQLData SQLNull :: SQLData -- | Exception thrown when SQLite3 reports an error. -- -- direct-sqlite may throw other types of exceptions if you misuse the -- API. data SQLError SQLError :: !Error -> Text -> Text -> SQLError -- | Error code returned by API call [sqlError] :: SQLError -> !Error -- | Text describing the error [sqlErrorDetails] :: SQLError -> Text -- | Indicates what action produced this error, e.g. exec "SELECT * -- FROM foo" [sqlErrorContext] :: SQLError -> Text -- | https://www.sqlite.org/c3ref/c_abort.html data Error -- | Successful result ErrorOK :: Error -- | SQL error or missing database ErrorError :: Error -- | Internal logic error in SQLite ErrorInternal :: Error -- | Access permission denied ErrorPermission :: Error -- | Callback routine requested an abort ErrorAbort :: Error -- | The database file is locked ErrorBusy :: Error -- | A table in the database is locked ErrorLocked :: Error -- | A malloc() failed ErrorNoMemory :: Error -- | Attempt to write a readonly database ErrorReadOnly :: Error -- | Operation terminated by sqlite3_interrupt() ErrorInterrupt :: Error -- | Some kind of disk I/O error occurred ErrorIO :: Error -- | The database disk image is malformed ErrorCorrupt :: Error -- | Unknown opcode in sqlite3_file_control() ErrorNotFound :: Error -- | Insertion failed because database is full ErrorFull :: Error -- | Unable to open the database file ErrorCan'tOpen :: Error -- | Database lock protocol error ErrorProtocol :: Error -- | Database is empty ErrorEmpty :: Error -- | The database schema changed ErrorSchema :: Error -- | String or BLOB exceeds size limit ErrorTooBig :: Error -- | Abort due to constraint violation ErrorConstraint :: Error -- | Data type mismatch ErrorMismatch :: Error -- | Library used incorrectly ErrorMisuse :: Error -- | Uses OS features not supported on host ErrorNoLargeFileSupport :: Error -- | Authorization denied ErrorAuthorization :: Error -- | Auxiliary database format error ErrorFormat :: Error -- | 2nd parameter to sqlite3_bind out of range ErrorRange :: Error -- | File opened that is not a database file ErrorNotADatabase :: Error -- | Notifications from sqlite3_log() ErrorNotice :: Error -- | Warnings from sqlite3_log() ErrorWarning :: Error -- | sqlite3_step() has another row ready ErrorRow :: Error -- | sqlite3_step() has finished executing ErrorDone :: Error -- | http://www.sqlite.org/c3ref/total_changes.html -- -- Return the total number of row changes caused by INSERT, -- DELETE, or UPDATE statements since the -- Database was opened. totalChanges :: Connection -> IO Int -- | http://www.sqlite.org/c3ref/changes.html -- -- Return the number of rows that were changed, inserted, or deleted by -- the most recent INSERT, DELETE, or UPDATE -- statement. changes :: Connection -> IO Int -- | Returns the rowid of the most recent successful INSERT on the given -- database connection. -- -- See also http://www.sqlite.org/c3ref/last_insert_rowid.html. lastInsertRowId :: Connection -> IO Int64 -- | Run an IO action inside a SQL transaction started with BEGIN -- EXCLUSIVE TRANSACTION, which immediately blocks all other -- database connections from writing, and other connections from reading -- (exception: read_uncommitted connections are allowed to read.) If the -- action throws any kind of an exception, the transaction will be rolled -- back with ROLLBACK TRANSACTION. Otherwise the results are -- committed with COMMIT TRANSACTION. withExclusiveTransaction :: () => Connection -> IO a -> IO a -- | Run an IO action inside a SQL transaction started with BEGIN -- IMMEDIATE TRANSACTION, which immediately blocks all other -- database connections from writing. The default SQLite3 BEGIN -- TRANSACTION does not acquire the write lock on BEGIN nor -- on SELECT but waits until you try to change data. If the -- action throws any kind of an exception, the transaction will be rolled -- back with ROLLBACK TRANSACTION. Otherwise the results are -- committed with COMMIT TRANSACTION. withImmediateTransaction :: () => Connection -> IO a -> IO a -- | Extracts the next row from the prepared statement. nextRow :: FromRow r => Statement -> IO (Maybe r) -- | A version of fold where the query parameters (placeholders) are -- named. foldNamed :: FromRow row => Connection -> Query -> [NamedParam] -> a -> (a -> row -> IO a) -> IO a -- | A version of fold which does not perform parameter -- substitution. fold_ :: FromRow row => Connection -> Query -> a -> (a -> row -> IO a) -> IO a -- | Perform a SELECT or other SQL query that is expected to -- return results. Results are converted and fed into the action -- callback as they are being retrieved from the database. -- -- This allows gives the possibility of processing results in constant -- space (for instance writing them to disk). -- -- Exceptions that may be thrown: -- -- fold :: (FromRow row, ToRow params) => Connection -> Query -> params -> a -> (a -> row -> IO a) -> IO a -- | A version of query that does not perform query substitution and -- takes an explicit RowParser. queryWith_ :: () => RowParser r -> Connection -> Query -> IO [r] -- | A version of query that takes an explicit RowParser. queryWith :: ToRow q => RowParser r -> Connection -> Query -> q -> IO [r] -- | Opens a prepared statement, executes an action using this statement, -- and closes the statement, even in the presence of exceptions. withStatement :: () => Connection -> Query -> (Statement -> IO a) -> IO a -- | Closes a prepared statement. closeStatement :: Statement -> IO () -- | Opens a prepared statement. A prepared statement must always be closed -- with a corresponding call to closeStatement before closing the -- connection. Use nextRow to iterate on the values returned. Once -- nextRow returns Nothing, you need to invoke reset -- before reexecuting the statement again with nextRow. openStatement :: Connection -> Query -> IO Statement -- | Binds parameters to a prepared statement, and resets the -- statement when the callback completes, even in the presence of -- exceptions. -- -- Use withBind to reuse prepared statements. Because it -- resets the statement after each usage, it avoids a -- pitfall involving implicit transactions. SQLite creates an implicit -- transaction if you don't say BEGIN explicitly, and does not -- commit it until all active statements are finished with either -- reset or closeStatement. withBind :: ToRow params => Statement -> params -> IO a -> IO a -- | Return number of columns in the query columnCount :: Statement -> IO ColumnIndex -- | Return the name of a a particular column in the result set of a -- Statement. Throws an ArrayException if the colum index -- is out of bounds. -- -- http://www.sqlite.org/c3ref/column_name.html columnName :: Statement -> ColumnIndex -> IO Text -- | Resets a statement. This does not reset bound parameters, if any, but -- allows the statement to be reexecuted again by invoking -- nextRow. reset :: Statement -> IO () -- | Binds named parameters to a prepared statement. bindNamed :: Statement -> [NamedParam] -> IO () -- | Binds parameters to a prepared statement. Once nextRow returns -- Nothing, the statement must be reset with the reset -- function before it can be executed again by calling nextRow. bind :: ToRow params => Statement -> params -> IO () -- | http://www.sqlite.org/c3ref/profile.html -- -- Enable/disable tracing of SQL execution. Tracing can be disabled by -- setting Nothing as the logger callback. -- -- Warning: If the logger callback throws an exception, your whole -- program may crash. Enable only for debugging! setTrace :: Connection -> Maybe (Text -> IO ()) -> IO () -- | Opens a database connection, executes an action using this connection, -- and closes the connection, even in the presence of exceptions. withConnection :: () => String -> (Connection -> IO a) -> IO a -- | Close a database connection. close :: Connection -> IO () -- | Open a database connection to a given file. Will throw an exception if -- it cannot connect. -- -- Every open must be closed with a call to close. -- -- If you specify ":memory:" or an empty string as the input filename, -- then a private, temporary in-memory database is created for the -- connection. This database will vanish when you close the connection. open :: String -> IO Connection -- | An SQLite prepared statement. newtype Statement Statement :: Statement -> Statement [unStatement] :: Statement -> Statement -- | Index of a column in a result set. Column indices start from 0. newtype ColumnIndex ColumnIndex :: ColumnIndex -> ColumnIndex data NamedParam [:=] :: forall v. ToField v => Text -> v -> NamedParam infixr 3 := -- | Exception thrown if a Query was malformed. This may occur if -- the number of '?' characters in the query string does not -- match the number of parameters provided. data FormatError FormatError :: String -> Query -> [String] -> FormatError [fmtMessage] :: FormatError -> String [fmtQuery] :: FormatError -> Query [fmtParams] :: FormatError -> [String] field :: FromField a => RowParser a -- | A collection type that can be converted from a sequence of fields. -- Instances are provided for tuples up to 10 elements and lists of any -- length. -- -- Note that instances can defined outside of sqlite-simple, which is -- often useful. For example, here's an instance for a user-defined pair: -- -- @data User = User { name :: String, fileQuota :: Int } -- -- instance FromRow User where fromRow = User <$> -- field <*> field @ -- -- The number of calls to field must match the number of fields -- returned in a single row of the query result. Otherwise, a -- ConversionFailed exception will be thrown. -- -- Note the caveats associated with user-defined implementations of -- fromRow. class FromRow a fromRow :: FromRow a => RowParser a -- | Exception thrown if conversion from a SQL value to a Haskell value -- fails. data ResultError -- | The SQL and Haskell types are not compatible. Incompatible :: String -> String -> String -> ResultError [errSQLType] :: ResultError -> String [errHaskellType] :: ResultError -> String [errMessage] :: ResultError -> String -- | A SQL NULL was encountered when the Haskell type did not -- permit it. UnexpectedNull :: String -> String -> String -> ResultError [errSQLType] :: ResultError -> String [errHaskellType] :: ResultError -> String [errMessage] :: ResultError -> String -- | The SQL value could not be parsed, or could not be represented as a -- valid Haskell value, or an unexpected low-level error occurred (e.g. -- mismatch between metadata and actual data in a row). ConversionFailed :: String -> String -> String -> ResultError [errSQLType] :: ResultError -> String [errHaskellType] :: ResultError -> String [errMessage] :: ResultError -> String -- | A collection type that can be turned into a list of SQLData -- elements. class ToRow a -- | ToField a collection of values. toRow :: ToRow a => a -> [SQLData] -- | A query string. This type is intended to make it difficult to -- construct a SQL query by concatenating string fragments, as that is an -- extremely common way to accidentally introduce SQL injection -- vulnerabilities into an application. -- -- This type is an instance of IsString, so the easiest way to -- construct a query is to enable the OverloadedStrings language -- extension and then simply write the query in double quotes. -- --
--   {-# LANGUAGE OverloadedStrings #-}
--   
--   import Database.SQLite.Simple
--   
--   q :: Query
--   q = "select ?"
--   
-- -- The underlying type is a Text, and literal Haskell strings -- that contain Unicode characters will be correctly transformed to -- UTF-8. newtype Query Query :: Text -> Query [fromQuery] :: Query -> Text -- | A composite type to parse your custom data structures without having -- to define dummy newtype wrappers every time. -- --
--   instance FromRow MyData where ...
--   
-- --
--   instance FromRow MyData2 where ...
--   
-- -- then I can do the following for free: -- --
--   res <- query' c "..."
--   forM res $ \(MyData{..} :. MyData2{..}) -> do
--     ....
--   
data (:.) h t (:.) :: h -> t -> (:.) h t infixr 3 :. infixr 3 :. -- | Connection to an open database. -- -- You can use connectionHandle to gain access to the underlying -- http://hackage.haskell.org/package/direct-sqlite connection. -- This may be useful if you need to access some direct-sqlite -- functionality that's not exposed in the sqlite-simple API. This should -- be a safe thing to do although mixing both APIs is discouraged. newtype Connection Connection :: Database -> Connection [connectionHandle] :: Connection -> Database module HsDev.Inspect.Resolve -- | Load environment and fixities from cache or sql loadEnv :: SessionMonad m => Maybe Path -> m (Environment, FixitiesTable) -- | Save environment and fixities to cache saveEnv :: SessionMonad m => Maybe Path -> Environment -> FixitiesTable -> m () -- | Load environment from sql loadEnvironment :: SessionMonad m => Maybe Path -> m Environment -- | Load fixities from sql loadFixities :: SessionMonad m => Maybe Path -> m FixitiesTable -- | Run with temporary table for environment withEnv :: SessionMonad m => Maybe Path -> m a -> m a -- | Try resolve module symbols resolveModule :: MonadThrow m => Environment -> FixitiesTable -> Preloaded -> InspectM ModuleLocation ModuleTag m Resolved -- | Resolve just preloaded part of module, this will give imports and -- scope resolvePreloaded :: MonadThrow m => Environment -> Preloaded -> InspectM ModuleLocation ModuleTag m Resolved -- | Resolve parsed module resolve :: Environment -> Module SrcSpanInfo -> Resolved -- | Save results in sql, updated temporary env table updateResolveds :: SessionMonad m => Maybe Path -> [InspectedResolved] -> m () module HsDev.Inspect -- | Preload module - load head and imports to get actual extensions and -- dependencies preload :: (MonadIO m, MonadCatch m) => Text -> [(String, String)] -> [String] -> Maybe Text -> InspectM ModuleLocation ModuleTag m Preloaded data AnalyzeEnv AnalyzeEnv :: Environment -> Map Name Fixity -> RefineTable -> AnalyzeEnv [_analyzeEnv] :: AnalyzeEnv -> Environment [_analyzeFixities] :: AnalyzeEnv -> Map Name Fixity [_analyzeRefine] :: AnalyzeEnv -> RefineTable analyzeEnv :: Lens' AnalyzeEnv Environment analyzeFixities :: Lens' AnalyzeEnv (Map Name Fixity) analyzeRefine :: Lens' AnalyzeEnv RefineTable moduleAnalyzeEnv :: Module -> AnalyzeEnv -- | Resolve module importsexportsscope analyzeResolve :: AnalyzeEnv -> Module -> Module -- | Inspect preloaded module analyzePreloaded :: AnalyzeEnv -> Preloaded -> Either String Module -- | Extract file docs and set them to module declarations inspectDocs :: [String] -> Module -> GhcM Module -- | Like inspectDocs, but in Ghc monad inspectDocsGhc :: [String] -> Module -> GhcM Module -- | Inspect contents inspectContents :: Text -> [(String, String)] -> [String] -> Text -> IO InspectedModule contentsInspection :: Text -> [String] -> IO Inspection -- | Inspect file inspectFile :: [(String, String)] -> [String] -> Path -> Maybe Project -> Maybe Text -> IO InspectedModule -- | Source inspection data, differs whether there are contents provided sourceInspection :: Path -> Maybe Text -> [String] -> IO Inspection -- | File modification time as posix time fileMTime :: Path -> IO POSIXTime -- | File inspection data fileInspection :: Path -> [String] -> IO Inspection -- | File contents inspection data fileContentsInspection :: [String] -> IO Inspection -- | File contents inspection data fileContentsInspection_ :: [String] -> POSIXTime -> Inspection -- | Installed module inspection data, just opts installedInspection :: [String] -> IO Inspection -- | Inspection by module location moduleInspection :: ModuleLocation -> [String] -> IO Inspection -- | Enumerate project dirs projectDirs :: Project -> IO [Extensions Path] -- | Enumerate project source files projectSources :: Project -> IO [Extensions Path] -- | Get actual defines getDefines :: IO [(String, String)] preprocess :: [(String, String)] -> Path -> Text -> IO Text preprocess_ :: [(String, String)] -> [String] -> Path -> Text -> IO Text instance GHC.Base.Semigroup HsDev.Inspect.AnalyzeEnv instance GHC.Base.Monoid HsDev.Inspect.AnalyzeEnv module HsDev.Scan -- | Compile flags type CompileFlag = String -- | Module with flags ready to scan type ModuleToScan = (ModuleLocation, [CompileFlag], Maybe Text) -- | 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 rescannable (i.e. already scanned) file enumRescan :: CommandMonad m => FilePath -> m ScanContents -- | Enum file dependent enumDependent :: CommandMonad m => FilePath -> 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] -> Path -> m Project -- | Scan additional info and modify scanned module scanModify :: CommandMonad m => ([String] -> Module -> m Module) -> InspectedModule -> m InspectedModule -- | Is inspected module up to date? upToDate :: SessionMonad m => ModuleLocation -> [String] -> Inspection -> m Bool -- | Returns new (to scan) and changed (to rescan) modules changedModules :: SessionMonad m => Map ModuleLocation Inspection -> [String] -> [ModuleToScan] -> m [ModuleToScan] -- | Returns file contents if it was set and still actual getFileContents :: SessionMonad m => Path -> m (Maybe (POSIXTime, Text)) 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.Types.PackageDbStack instance HsDev.Scan.EnumContents HsDev.Project.Types.Sandbox instance HsDev.Scan.EnumContents a => HsDev.Scan.EnumContents [a] instance HsDev.Scan.EnumContents GHC.IO.FilePath instance HsDev.Scan.EnumContents System.Directory.Paths.Path instance HsDev.Scan.EnumContents HsDev.Server.Types.FileSource instance Control.DeepSeq.NFData HsDev.Scan.ScanContents instance GHC.Base.Semigroup HsDev.Scan.ScanContents instance GHC.Base.Monoid HsDev.Scan.ScanContents instance Text.Format.Formattable HsDev.Scan.ScanContents module HsDev.Inspect.Order -- | Order source files so that dependencies goes first and we are able to -- resolve symbols and set fixities orderBy :: (a -> Maybe Preloaded) -> [a] -> Either (DepsError Path) [a] order :: [Preloaded] -> Either (DepsError Path) [Preloaded] 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 -- | Event data Event Event :: EventType -> FilePath -> POSIXTime -> Event [_eventType] :: Event -> EventType [_eventPath] :: Event -> FilePath [_eventTime] :: Event -> POSIXTime -- | Event type data EventType Added :: EventType Modified :: EventType Removed :: EventType -- | Map from directory to watch stopper watcherDirs :: Watcher a -> MVar (Map FilePath (Bool, IO ())) watcherMan :: Watcher a -> WatchManager watcherChan :: Watcher a -> Chan (a, Event) eventPath :: Lens' Event FilePath eventTime :: Lens' Event POSIXTime eventType :: Lens' Event EventType -- | 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 event group eventGroup :: Watcher a -> NominalDiffTime -> ([(a, Event)] -> IO ()) -> IO () -- | Process all events onEvents :: Watcher a -> NominalDiffTime -> ([(a, Event)] -> IO ()) -> IO () -- | Process all events onEvents_ :: Watcher a -> ([(a, Event)] -> IO ()) -> IO () 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 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 UpdateState (WriterT [ModuleLocation] (ClientM m)) a -> UpdateM m a [runUpdateM] :: UpdateM m a -> ReaderT UpdateState (WriterT [ModuleLocation] (ClientM m)) a runUpdate :: ServerMonadBase m => UpdateOptions -> UpdateM m a -> ClientM m a -- | Post status postStatus :: UpdateMonad m => Task -> m () -- | Mark module as updated updater :: UpdateMonad m => [ModuleLocation] -> m () -- | 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 a] -> m [a] -- | Run many tasks with numeration runTasks_ :: UpdateMonad m => [m ()] -> m () -- | Scan modules scanModules :: UpdateMonad m => [String] -> [ModuleToScan] -> m () -- | Scan source file, possibly scanning also related project and installed -- modules scanFile :: UpdateMonad m => [String] -> Path -> BuildTool -> Bool -> Bool -> m () -- | Scan source files, resolving dependent modules scanFiles :: UpdateMonad m => [(FileSource, [String])] -> m () -- | Scan source file with contents and resolve dependent modules scanFileContents :: UpdateMonad m => [String] -> Path -> Maybe Text -> 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 top of package-db stack, usable for rescan scanPackageDbStack :: UpdateMonad m => [String] -> PackageDbStack -> m () -- | Scan project file scanProjectFile :: UpdateMonad m => [String] -> BuildTool -> Path -> m Project -- | Scan project and related package-db stack scanProjectStack :: UpdateMonad m => [String] -> BuildTool -> Path -> m () -- | Scan project scanProject :: UpdateMonad m => [String] -> BuildTool -> Path -> m () -- | Scan directory for source files and projects scanDirectory :: UpdateMonad m => [String] -> Path -> m () -- | Scan installed docs scanPackageDbStackDocs :: UpdateMonad m => [String] -> PackageDbStack -> m () -- | Scan docs for inspected modules scanDocs :: UpdateMonad m => [Module] -> m () -- | Set inferred types for module setModTypes :: UpdateMonad m => ModuleId -> [Note TypedExpr] -> m () -- | Infer types for modules inferModTypes :: UpdateMonad m => [Module] -> m () -- | Generic scan function. Removed obsolete modules and calls callback on -- changed modules. scan :: UpdateMonad m => m [Only Int :. (ModuleLocation :. Inspection)] -> [ModuleToScan] -> [String] -> ([ModuleToScan] -> m ()) -> m () processEvents :: ([(Watched, Event)] -> IO ()) -> MVar (Async ()) -> MVar [(Watched, Event)] -> [(Watched, Event)] -> ClientM IO () updateEvents :: ServerMonadBase m => [(Watched, Event)] -> UpdateM m () applyUpdates :: UpdateOptions -> [(Watched, Event)] -> ClientM IO () cacheGhcWarnings :: Session -> [ModuleLocation] -> GhcM a -> GhcM a -- | Get cached warnings cachedWarnings :: SessionMonad m => [ModuleLocation] -> m [Note OutputMessage] instance Control.DeepSeq.NFData HsDev.Database.Update.PreloadFailure module HsDev.Client.Commands runClient :: (ToJSON a, ServerMonadBase m) => CommandOptions -> ClientM m a -> ServerM m Result runCommand :: ServerMonadBase m => Command -> ClientM m Value instance Data.Aeson.Types.ToJSON.ToJSON System.Log.Simple.Base.Message instance Data.Aeson.Types.FromJSON.FromJSON System.Log.Simple.Base.Message 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) -- | Start listening for incoming connections setupServer :: ServerOpts -> ServerM IO () -- | Shutdown server shutdownServer :: ServerOpts -> ServerM IO () startServer :: ServerOpts -> IO Server startServer_ :: ServerOpts -> IO Server stopServer :: Server -> IO () withServer :: ServerOpts -> (Server -> IO a) -> IO a withServer_ :: ServerOpts -> (Server -> IO a) -> IO a inServer :: Server -> ServerM IO a -> IO a clientCommand :: CommandOptions -> Command -> ServerM IO Result parseCommand :: [String] -> Either String Command readCommand :: [String] -> Command sendServer :: Server -> CommandOptions -> [String] -> IO Result sendServer_ :: Server -> [String] -> IO Result 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 () -- | If response points to mmap, get its contents and parse unMmap :: Response -> IO Response makeSocket :: ConnectionPort -> IO Socket sockAddr :: ConnectionPort -> HostAddress -> SockAddr module HsDev.Server.Commands -- | Server control command data ServerCommand Version :: Bool -> 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 -> Bool -> Maybe FilePath -> Bool -> Bool -> ServerOpts [serverPort] :: ServerOpts -> ConnectionPort [serverTimeout] :: ServerOpts -> Int [serverLog] :: ServerOpts -> Maybe FilePath [serverLogLevel] :: ServerOpts -> String [serverLogNoColor] :: ServerOpts -> Bool [serverDbFile] :: ServerOpts -> Maybe FilePath [serverWatchFS] :: 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