|
@@ -16,6 +16,7 @@ import qualified System.Exit as Exit
|
|
|
import qualified Parser
|
|
|
import qualified Types
|
|
|
|
|
|
+
|
|
|
readMap :: FilePath -> IO Types.TableMap
|
|
|
readMap path = do
|
|
|
cs <- Text.readFile path
|
|
@@ -26,7 +27,7 @@ readMap path = do
|
|
|
|
|
|
main :: IO ()
|
|
|
main = do
|
|
|
- tablesRef <- IO.newIORef =<< readMap "tables.txt"
|
|
|
+ tablesRef <- IO.newIORef =<< readMap "perilous-wilds.txt"
|
|
|
Readline.setCompletionEntryFunction $ Just $ \ rs -> do
|
|
|
tables <- IO.readIORef tablesRef
|
|
|
pure [ Text.unpack k
|
|
@@ -44,9 +45,8 @@ main = do
|
|
|
tables <- IO.readIORef tablesRef
|
|
|
Text.putStrLn "Available tables: "
|
|
|
Text.putStrLn (" " <> Text.unwords (Map.keys tables))
|
|
|
- IO.writeIORef tablesRef =<< readMap "tables.txt"
|
|
|
Just ":r" ->
|
|
|
- IO.writeIORef tablesRef =<< readMap "tables.txt"
|
|
|
+ IO.writeIORef tablesRef =<< readMap "perilous-wilds.txt"
|
|
|
Just choice -> do
|
|
|
tables <- IO.readIORef tablesRef
|
|
|
let names = Text.unwords (Map.keys tables)
|