on master help sign in
Support :apropos in IDESlave
commitbb3a7b779eec400f4398c88578b46b0ab4ba7bab authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateTue 18 Mar 2014, 13:46 (13 years ago) parent6f0ef2f
2 files changed+6
src/Idris/IdeSlave.hs+2 src/Idris/REPL.hs+4
src/Idris/IdeSlave.hs+2
@@ -135,6 +135,7 @@ data IdeSlaveCommand = REPLCompletions String
135135 | ProofSearch Int String [String]
136136 | LoadFile String
137137 | DocsFor String
138+ | Apropos String
138139 deriving Show
139140
140141sexpToCommand :: SExp -> Maybe IdeSlaveCommand
@@ -153,6 +154,7 @@ sexpToCommand (SexpList [SymbolAtom "proof-search", IntegerAtom line, StringAtom
153154 StringAtom s -> Just s
154155 _ -> Nothing)
155156sexpToCommand (SexpList [SymbolAtom "docs-for", StringAtom name]) = Just (DocsFor name)
157+sexpToCommand (SexpList [SymbolAtom "apropos", StringAtom search]) = Just (Apropos search)
156158sexpToCommand _ = Nothing
157159
158160parseMessage :: String -> Either Err (SExp, Integer)
src/Idris/REPL.hs+4
@@ -266,6 +266,8 @@ ideslave orig mods
266266 process stdout fn (MakeWith False line (sUN name))
267267 Just (IdeSlave.ProofSearch line name hints) ->
268268 process stdout fn (DoProofSearch False line (sUN name) (map sUN hints))
269+ Just (IdeSlave.Apropos a) ->
270+ process stdout fn (Apropos a)
269271 Nothing -> do iPrintError "did not understand")
270272 (\e -> do iPrintError $ show e))
271273 (\e -> do iPrintError $ show e)
@@ -337,6 +339,8 @@ ideslaveProcess fn (MakeWith False pos str) = process stdout fn (MakeWith False
337339ideslaveProcess fn (DoProofSearch False pos str xs) = process stdout fn (DoProofSearch False pos str xs)
338340ideslaveProcess fn (SetConsoleWidth w) = do process stdout fn (SetConsoleWidth w)
339341 iPrintResult ""
342+ideslaveProcess fn (Apropos a) = do process stdout fn (Apropos a)
343+ iPrintResult ""
340344ideslaveProcess fn _ = iPrintError "command not recognized or not supported"
341345
342346