Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- codeActionSupportCaps :: ClientCapabilities
- expectCodeAction :: [Command |? CodeAction] -> [Text] -> IO ()
- dontExpectCodeAction :: [Command |? CodeAction] -> [Text] -> IO ()
- expectDiagnostic :: [Diagnostic] -> [Text] -> IO ()
- expectNoMoreDiagnostics :: Seconds -> TextDocumentIdentifier -> String -> Session ()
- expectSameLocations :: [Location] -> [SymbolLocation] -> Assertion
- failIfSessionTimeout :: IO a -> IO a
- flushStackEnvironment :: IO ()
- fromAction :: (Command |? CodeAction) -> CodeAction
- fromCommand :: (Command |? CodeAction) -> Command
- getCompletionByLabel :: MonadIO m => Text -> [CompletionItem] -> m CompletionItem
- ghcVersion :: GhcVersion
- data GhcVersion
- hostOS :: OS
- data OS
- matchesCurrentEnv :: EnvSpec -> Bool
- data EnvSpec
- = HostOS OS
- | GhcVer GhcVersion
- noLiteralCaps :: ClientCapabilities
- ignoreForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
- ignoreInEnv :: [EnvSpec] -> String -> TestTree -> TestTree
- onlyRunForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
- inspectCodeAction :: [Command |? CodeAction] -> [Text] -> IO CodeAction
- inspectCommand :: [Command |? CodeAction] -> [Text] -> IO Command
- inspectDiagnostic :: [Diagnostic] -> [Text] -> IO Diagnostic
- knownBrokenOnWindows :: String -> TestTree -> TestTree
- knownBrokenForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
- knownBrokenInEnv :: [EnvSpec] -> String -> TestTree -> TestTree
- onlyWorkForGhcVersions :: (GhcVersion -> Bool) -> String -> TestTree -> TestTree
- setupBuildToolFiles :: IO ()
- type SymbolLocation = (FilePath, UInt, UInt)
- waitForDiagnosticsFrom :: TextDocumentIdentifier -> Session [Diagnostic]
- waitForDiagnosticsFromSource :: TextDocumentIdentifier -> String -> Session [Diagnostic]
- waitForDiagnosticsFromSourceWithTimeout :: Seconds -> TextDocumentIdentifier -> String -> Session [Diagnostic]
- withCurrentDirectoryInTmp :: FilePath -> IO a -> IO a
- withCurrentDirectoryInTmp' :: [FilePath] -> FilePath -> IO a -> IO a
- withCanonicalTempDir :: (FilePath -> IO a) -> IO a
Documentation
expectCodeAction :: [Command |? CodeAction] -> [Text] -> IO () Source #
dontExpectCodeAction :: [Command |? CodeAction] -> [Text] -> IO () Source #
expectDiagnostic :: [Diagnostic] -> [Text] -> IO () Source #
expectNoMoreDiagnostics :: Seconds -> TextDocumentIdentifier -> String -> Session () Source #
wait for timeout
seconds and report an assertion failure
if any diagnostic messages arrive in that period
expectSameLocations :: [Location] -> [SymbolLocation] -> Assertion Source #
failIfSessionTimeout :: IO a -> IO a Source #
flushStackEnvironment :: IO () Source #
fromAction :: (Command |? CodeAction) -> CodeAction Source #
fromCommand :: (Command |? CodeAction) -> Command Source #
getCompletionByLabel :: MonadIO m => Text -> [CompletionItem] -> m CompletionItem Source #
data GhcVersion #
Instances
Show GhcVersion | |
Defined in Development.IDE.GHC.Compat showsPrec :: Int -> GhcVersion -> ShowS # show :: GhcVersion -> String # showList :: [GhcVersion] -> ShowS # | |
Eq GhcVersion | |
Defined in Development.IDE.GHC.Compat (==) :: GhcVersion -> GhcVersion -> Bool # (/=) :: GhcVersion -> GhcVersion -> Bool # | |
Ord GhcVersion | |
Defined in Development.IDE.GHC.Compat compare :: GhcVersion -> GhcVersion -> Ordering # (<) :: GhcVersion -> GhcVersion -> Bool # (<=) :: GhcVersion -> GhcVersion -> Bool # (>) :: GhcVersion -> GhcVersion -> Bool # (>=) :: GhcVersion -> GhcVersion -> Bool # max :: GhcVersion -> GhcVersion -> GhcVersion # min :: GhcVersion -> GhcVersion -> GhcVersion # |
matchesCurrentEnv :: EnvSpec -> Bool Source #
ignoreForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree Source #
ignoreInEnv :: [EnvSpec] -> String -> TestTree -> TestTree Source #
IgnoreTest if any of environmental spec mathces the current environment.
onlyRunForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree Source #
Ignore the test if GHC does not match only work versions.
inspectCodeAction :: [Command |? CodeAction] -> [Text] -> IO CodeAction Source #
inspectCommand :: [Command |? CodeAction] -> [Text] -> IO Command Source #
inspectDiagnostic :: [Diagnostic] -> [Text] -> IO Diagnostic Source #
knownBrokenForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree Source #
knownBrokenInEnv :: [EnvSpec] -> String -> TestTree -> TestTree Source #
Mark as broken if any of environmental spec mathces the current environment.
onlyWorkForGhcVersions :: (GhcVersion -> Bool) -> String -> TestTree -> TestTree Source #
Mark as broken if GHC does not match only work versions.
setupBuildToolFiles :: IO () Source #
type SymbolLocation = (FilePath, UInt, UInt) Source #
To locate a symbol, we provide a path to the file from the HLS root directory, the line number, and the column number. (0 indexed.)
waitForDiagnosticsFromSourceWithTimeout :: Seconds -> TextDocumentIdentifier -> String -> Session [Diagnostic] Source #
wait for timeout
seconds and return diagnostics for the given document and
source.
If timeout is 0 it will wait until the session timeout
withCurrentDirectoryInTmp :: FilePath -> IO a -> IO a Source #
Like withCurrentDirectory
, but will copy the directory over to the system
temporary directory first to avoid haskell-language-server's source tree from
interfering with the cradle.
Ignores directories containing build artefacts to avoid interference and provide reproducible test-behaviour.
withCurrentDirectoryInTmp' :: [FilePath] -> FilePath -> IO a -> IO a Source #
Like withCurrentDirectory
, but will copy the directory over to the system
temporary directory first to avoid haskell-language-server's source tree from
interfering with the cradle.
You may specify directories to ignore, but should be careful to maintain reproducibility.