hslua-cli: Command-line interface for Lua

[ foreign, library, mit ] [ Propose Tags ] [ Report a vulnerability ]

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, 1.4.3
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]
Tested with ghc ==8.4.4, ghc ==8.6.5, ghc ==8.8.4, ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.8, ghc ==9.4.8, ghc ==9.6.5, ghc ==9.8.2, ghc ==9.10.1
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-06-28T09:49:39Z
Distributions Arch:1.4.1, Fedora:1.4.2, LTSHaskell:1.4.3, NixOS:1.4.3, Stackage:1.4.3, openSUSE:1.4.3
Executables hslua
Downloads 4498 total (248 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-06-28 [all 1 reports]

Readme for hslua-cli-1.4.3

[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