hslua-cli: Command-line interface for Lua

[ foreign, library, mit ] [ Propose Tags ]

Provides an embeddable command-line interface for Lua. The interface is compatible with the standard Lua interpreter, i.e., the lua executable provided in a default Lua installation.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Automatic Flags
NameDescriptionDefault
executable

Compile hslua standalone executable.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.4.0.1, 1.4.1, 1.4.2
Change log CHANGELOG.md
Dependencies base (>=4.11 && <5), bytestring, hslua-cli, hslua-core (>=2.3 && <2.4), hslua-marshalling (>=2.2 && <2.4), hslua-repl (>=0.1 && <0.2), lua (>=2.3 && <2.4), text (>=1.2 && <2.2), unix (>=2.7 && <2.9) [details]
License MIT
Copyright © 2022-2024 Albert Krewinkel
Author Albert Krewinkel
Maintainer Albert Krewinkel <tarleb@hslua.org>
Category Foreign
Home page https://hslua.org/
Bug tracker https://github.com/hslua/hslua/issues
Source repo head: git clone https://github.com/hslua/hslua(hslua-cli)
Uploaded by tarleb at 2024-01-18T17:29:23Z
Distributions Arch:1.4.1, Fedora:1.4.1, LTSHaskell:1.4.2, NixOS:1.4.2, Stackage:1.4.2, openSUSE:1.4.2
Executables hslua
Downloads 2745 total (169 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-01-18 [all 1 reports]

Readme for hslua-cli-1.4.2

[back to package description]

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