hslua-cli

Command-line interface for Lua

https://hslua.org/

Version on this page:1.4.2
LTS Haskell 22.39:1.4.3
Stackage Nightly 2024-10-31:1.4.3
Latest on Hackage:1.4.3

See all snapshots hslua-cli appears in

MIT licensed by Albert Krewinkel
Maintained by Albert Krewinkel
This version can be pinned in stack with:hslua-cli-1.4.2@sha256:2c01873f79320cd13b644a130d1a05c1ba3bba99f2996e8c31aa44b3ff92e43b,2866

Module documentation for 1.4.2

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

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

Changes

Changelog

hslua-cli uses PVP Versioning.

hslua-cli-1.4.2

Released 2024-01-18.

  • Relaxed upper bound for text, allowing text-2.1.

hslua-cli-1.4.1

Released 2023-03-18.

  • Always start the REPL if the -i parameter is given on the command line. This fixes a bug where the REPL would not start if -v, -e or -l where given.

hslua-cli-1.4.0.1

Released 2023-03-17.

  • Fix building on Windows.

hslua-cli-1.4.0

Released 2023-03-16.

  • Isocline-based REPL: interactive mode is now supported with the help of a new repl built with the isocline library.

hslua-cli-1.3.0

Released 2023-03-13.

  • Require hslua-core 2.3.

hslua-cli-1.2.0

Released 2022-09-27.

  • The function runStandalone now takes two additional arguments, the program name and list command line args.

hslua-cli-1.1.0

Released 2022-09-26.

  • Added support for the LUA_INIT environment variable. The behavior is as described in the Lua reference manual.

  • Warnings are now enabled when flag -W is given.

hslua-cli-1.0.0

Released 2022-09-23.

  • Initial release.