@@ -52,6 +52,7 @@ parserCommandsForHelp =
52 , " Search for values by type", cmd_search)
52 , " Search for values by type", cmd_search)
53 , nameArgCmd ["wc", "whocalls"] WhoCalls "List the callers of some name"
53 , nameArgCmd ["wc", "whocalls"] WhoCalls "List the callers of some name"
54 , nameArgCmd ["cw", "callswho"] CallsWho "List the callees of some name"
54 , nameArgCmd ["cw", "callswho"] CallsWho "List the callees of some name"
55+ , namespaceArgCmd ["browse"] Browse "List the contents of some namespace"
55 , nameArgCmd ["total"] TotCheck "Check the totality of a name"
56 , nameArgCmd ["total"] TotCheck "Check the totality of a name"
56 , noArgCmd ["r", "reload"] Reload "Reload current file"
57 , noArgCmd ["r", "reload"] Reload "Reload current file"
57 , (["l", "load"], FileArg, "Load a new file"
58 , (["l", "load"], FileArg, "Load a new file"
@@ -136,17 +137,19 @@ parserCommands =
139−noArgCmd names command doc =
140+noArgCmd names command doc =
140 (names, NoArg, doc, noArgs command)
141 (names, NoArg, doc, noArgs command)
141−nameArgCmd names command doc =
142+nameArgCmd names command doc =
142 (names, NameArg, doc, fnNameArg command)
143 (names, NameArg, doc, fnNameArg command)
144+namespaceArgCmd names command doc =
145+ (names, NamespaceArg, doc, namespaceArg command)
143−exprArgCmd names command doc =
146+exprArgCmd names command doc =
144 (names, ExprArg, doc, exprArg command)
147 (names, ExprArg, doc, exprArg command)
145−metavarArgCmd names command doc =
148+metavarArgCmd names command doc =
146 (names, MetaVarArg, doc, fnNameArg command)
149 (names, MetaVarArg, doc, fnNameArg command)
147−optArgCmd names command doc =
150+optArgCmd names command doc =
148 (names, OptionArg, doc, optArg command)
151 (names, OptionArg, doc, optArg command)
149−proofArgCmd names command doc =
152+proofArgCmd names command doc =
150 (names, NoArg, doc, proofArg command)
153 (names, NoArg, doc, proofArg command)
152pCmd :: P.IdrisParser (Either String Command)
155pCmd :: P.IdrisParser (Either String Command)
@@ -220,6 +223,11 @@ moduleArg = genArg "module" (fmap toPath P.identifier)
221 toPath n = foldl1' (</>) $ splitOn "." n
224 toPath n = foldl1' (</>) $ splitOn "." n
226+namespaceArg :: ([String] -> Command) -> String -> P.IdrisParser (Either String Command)
227+namespaceArg = genArg "namespace" (fmap toNS P.identifier)
223optArg :: (Opt -> Command) -> String -> P.IdrisParser (Either String Command)
231optArg :: (Opt -> Command) -> String -> P.IdrisParser (Either String Command)
224optArg cmd name = do
232optArg cmd name = do
225 let emptyArgs = do
233 let emptyArgs = do