hslua-cli

Command-line interface for Lua

https://hslua.org/

Version on this page:1.4.1
LTS Haskell 22.21:1.4.2
Stackage Nightly 2024-05-06:1.4.2
Latest on Hackage:1.4.2

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.1@sha256:0f2d0dc2e5517b1f7823b626d3ab584b5f7c098ada2fbf07ad636dea7da06267,2798

Module documentation for 1.4.1

Used by 1 package in nightly-2023-09-18(full list with versions):

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.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.