1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
hslua-cli
=========
Library that allows to embed a standalone Lua interpreter into a
larger program. The provided command-line interface is mostly
compatible with that of the default `lua` executable that ships
with Lua.
Example
-------
``` haskell
import HsLua.Core as Lua (Exception, openlibs, run)
import HsLua.CLI (Settings (..), runStandalone)
-- | Run a default Lua interpreter.
main :: IO ()
main = do
let settings = Settings
{ settingsVersionInfo = "\nembedded in MyProgram"
, settingsRunner = \action -> run $ do
openlibs
action
}
runStandalone @Lua.Exception settings
```
|