Version : 0.1
This module provides a tiny and nice implementation of a little command shell. It can be feed with individual commands and provides a simple but powerful way to interact with your program. The following functions are implemented by default: exit - exit the console loop help - print a nice help
There was a little bug with the System.Console.Readline package. When we use this option, we make a foreign call... and the Haskell library documentation say this about concurrency and GHC:
If you don't use the -threaded option, then the runtime does not make use of multiple OS threads. Foreign calls will block all other running Haskell threads until the call returns. The System.IO library still does multiplexing, so there can be multiple threads doing IO, and this is handled internally by the runtime using select.
We make a foreign call, which is not in the System.IO library, so we have to work with -threaded when we want a fancy command history.
|Map which contains all commands that the user can execute|
|gets the next option from the command line as string|
|Simple parser for the commandline...|
|Creates a new console datatype|
|The main loop. You know... read stdin, parse the input, execute command. You can quit it by the exit-command.|
|Produced by Haddock version 2.4.2|