File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import Options.Applicative
8
8
9
9
type Arguments = Arguments' IdeCmd
10
10
11
- data IdeCmd = Typecheck [FilePath ] | DbCmd Options Command | LSP
11
+ data IdeCmd = Typecheck [FilePath ] | DbCmd Options Command | DbIndex [ FilePath ] | LSP
12
12
13
13
data Arguments' a = Arguments
14
14
{ argLSP :: Bool
@@ -47,10 +47,12 @@ arguments = Arguments
47
47
<*> switch (long " verbose" <> help " Include internal events in logging output" )
48
48
<*> ( hsubparser (command " typecheck" (info (Typecheck <$> fileCmd) fileInfo)
49
49
<> command " hiedb" (info (DbCmd <$> optParser " " True <*> cmdParser <**> helper) hieInfo)
50
- <> command " lsp" (info (pure LSP <**> helper) lspInfo) )
50
+ <> command " index" (info (DbIndex <$> fileCmd) indexInfo)
51
+ <> command " lsp" (info (pure LSP <**> helper) lspInfo))
51
52
<|> Typecheck <$> fileCmd )
52
53
where
53
54
fileCmd = many (argument str (metavar " FILES/DIRS..." ))
54
55
lspInfo = fullDesc <> progDesc " Start talking to an LSP client"
55
56
fileInfo = fullDesc <> progDesc " Used as a test bed to check your IDE will work"
56
57
hieInfo = fullDesc <> progDesc " Query .hie files"
58
+ indexInfo = fullDesc <> progDesc " Load the given files and index all the known targets"
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ main = do
86
86
{Main. argCommand = case argFilesOrCmd of
87
87
Typecheck x | not argLSP -> Main. Check x
88
88
DbCmd x y -> Main. Db " ." x y
89
+ DbIndex dir -> Main. Index dir
89
90
_ -> Main. Lsp
90
91
91
92
,Main. argsLogger = pure logger
You can’t perform that action at this time.
0 commit comments