Skip to content

Commit

Permalink
Show modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
robrix committed Oct 21, 2020
1 parent 1f753b1 commit 5b9809a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Facet/REPL.hs
Expand Up @@ -126,6 +126,7 @@ loop = do
Quit -> empty
Show t -> case t of
Paths -> gets ((pretty "search paths:" <\>) . nest 2 . unlines . map pretty . searchPaths) >>= print
Modules -> gets (unlines . map pretty . Map.keys . files) >>= print
Load path -> load src path
Reload -> reload src
Type e -> do
Expand All @@ -148,6 +149,7 @@ commands =
, Command ["quit", "q"] "exit the repl" $ Pure Quit
, Command ["show"] "show compiler state" $ Meta "target" $ Show <$> choice
[ Paths <$ whole (token (string "paths"))
, Modules <$ whole (token (string "modules"))
]
, Command ["load", "l"] "add a module to the repl" $ Meta "path" load_
, Command ["reload", "r", ""] "reload the loaded modules" $ Pure Reload
Expand Down

0 comments on commit 5b9809a

Please sign in to comment.