Skip to content

Commit 7dbae73

Browse files
committed
Repl: doc: promote comments
1 parent 8ae9c89 commit 7dbae73

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

main/Repl.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ printValue val = do
260260

261261
-- * Commands
262262

263-
-- :browse command
263+
-- | @:browse@ command
264264
browse :: (MonadNix e t f m, MonadIO m)
265265
=> String
266266
-> Repl e t f m ()
@@ -270,7 +270,7 @@ browse _ = do
270270
liftIO $ putStr $ Data.Text.unpack $ k <> " = "
271271
printValue v
272272

273-
-- :load command
273+
-- | @:load@ command
274274
load
275275
:: (MonadNix e t f m, MonadIO m)
276276
=> String
@@ -283,7 +283,7 @@ load args = do
283283
$ Data.Text.pack args
284284
void $ exec True contents
285285

286-
-- :type command
286+
-- | @:type@ command
287287
typeof
288288
:: (MonadNix e t f m, MonadIO m)
289289
=> String
@@ -305,11 +305,11 @@ typeof args = do
305305
liftIO $ putStrLn s
306306

307307

308-
-- :quit command
308+
-- | @:quit@ command
309309
quit :: (MonadNix e t f m, MonadIO m) => a -> Repl e t f m ()
310310
quit _ = liftIO System.Exit.exitSuccess
311311

312-
-- :set command
312+
-- | @:set@ command
313313
setConfig :: (MonadNix e t f m, MonadIO m) => String -> Repl e t f m ()
314314
setConfig args = case words args of
315315
[] -> liftIO $ putStrLn "No option to set specified"
@@ -321,7 +321,7 @@ setConfig args = case words args of
321321

322322
-- * Interactive Shell
323323

324-
-- Prefix tab completer
324+
-- | Prefix tab completer
325325
defaultMatcher :: MonadIO m => [(String, CompletionFunc m)]
326326
defaultMatcher =
327327
[ (":load", System.Console.Repline.fileCompleter)
@@ -411,7 +411,7 @@ completeFunc reversedPrev word
411411
NVSet xs _ -> withMap xs
412412
_ -> pure mempty
413413

414-
-- HelpOption inspired by Dhall Repl
414+
-- | HelpOption inspired by Dhall Repl
415415
-- with `Doc` instead of String for syntax and doc
416416
data HelpOption e t f m = HelpOption
417417
{ helpOptionName :: String
@@ -466,7 +466,7 @@ helpOptions =
466466
setConfig
467467
]
468468

469-
-- Options for :set
469+
-- | Options for :set
470470
data HelpSetOption = HelpSetOption
471471
{ helpSetOptionName :: String
472472
, helpSetOptionSyntax :: Doc ()

0 commit comments

Comments
 (0)