lua-2.3.4: lua.cabal
cabal-version: 2.2
name: lua
version: 2.3.4
synopsis: Lua, an embeddable scripting language
description: This package provides bindings and types to bridge
Haskell and <https://www.lua.org/ Lua>.
.
The full Lua interpreter version 5.4.8 is included.
Alternatively, a system-wide Lua installation can be
linked instead.
homepage: https://hslua.org/
bug-reports: https://github.com/hslua/hslua/issues
license: MIT
license-file: LICENSE
author: Albert Krewinkel
maintainer: Albert Krewinkel <tarleb@hslua.org>
copyright: © 2007–2012 Gracjan Polak;
© 2012–2016 Ömer Sinan Ağacan;
© 2017-2025 Albert Krewinkel
category: Foreign
build-type: Simple
extra-source-files: cbits/lua-5.4.8/*.h
, cbits/hslua/*.h
, README.md
, CHANGELOG.md
tested-with: GHC == 8.8.4
, GHC == 8.10.7
, GHC == 9.0.2
, GHC == 9.2.8
, GHC == 9.4.8
, GHC == 9.6.7
, GHC == 9.8.4
, GHC == 9.10.2
, GHC == 9.12.2
source-repository head
type: git
location: https://github.com/hslua/hslua.git
subdir: lua
flag system-lua
default: False
manual: True
description: Use the system-wide Lua instead of the bundled copy.
flag apicheck
default: False
manual: True
description: Compile Lua with -DLUA_USE_APICHECK.
flag lua_32bits
default: False
manual: True
description: Compile Lua with -DLUA_32BITS
flag allow-unsafe-gc
default: True
manual: True
description: Allow optimizations which make Lua's garbage collection
potentially unsafe; enabling this should be safe if
there are no callbacks into Haskell during Lua garbage
collection cycles. The flag should be *disabled* if Lua
objects can have Haskell finalizers, i.e., @__gc@
metamethods that call Haskell function.
flag export-dynamic
default: True
manual: True
description: Add all symbols to dynamic symbol table; disabling this
will make it possible to create fully static binaries,
but renders loading of dynamic C libraries impossible.
flag pkg-config
default: False
manual: True
description: Use @pkg-config@ to discover library and include paths.
Setting this flag implies `system-lua`.
flag cross-compile
default: False
manual: True
description: Avoids constructs that would prevent cross-compilation.
The Lua version constants may become inaccurate when
this flag is enabled.
common common-options
default-language: Haskell2010
build-depends: base >= 4.11 && < 5
ghc-options: -Wall
-Wcpp-undef
-Werror=missing-home-modules
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wnoncanonical-monad-instances
-Wpartial-fields
-Wredundant-constraints
-fhide-source-paths
if impl(ghc >= 8.10)
ghc-options: -Wunused-packages
if impl(ghc >= 9.0)
ghc-options: -Winvalid-haddock
if flag(lua_32bits)
cc-options: -DLUA_32BITS
if flag(apicheck)
cc-options: -DLUA_USE_APICHECK
if flag(allow-unsafe-gc)
cpp-options: -DALLOW_UNSAFE_GC
if flag(cross-compile)
cpp-options: -D_LUA_NO_CONST_STR
library
import: common-options
exposed-modules: Lua
, Lua.Auxiliary
, Lua.Call
, Lua.Constants
, Lua.Debug
, Lua.Ersatz
, Lua.Ersatz.Auxiliary
, Lua.Ersatz.Functions
, Lua.Lib
, Lua.Primary
, Lua.Types
, Lua.Userdata
, Lua.Warn
hs-source-dirs: src
default-extensions: CApiFFI
, ForeignFunctionInterface
, LambdaCase
, StrictData
other-extensions: CPP
, DeriveGeneric
, GeneralizedNewtypeDeriving
, PatternSynonyms
c-sources: cbits/hslua/hsludata.c
, cbits/hslua/hslcall.c
, cbits/hslua/hslauxlib.c
, cbits/hslua/hslua.c
, cbits/hslua/hslwarn.c
include-dirs: cbits/hslua
includes: lua.h
, luaconf.h
, lauxlib.h
, lualib.h
if flag(system-lua) || flag(pkg-config)
if flag(pkg-config)
pkgconfig-depends: lua5.4
else
extra-libraries: lua
else
include-dirs: cbits/lua-5.4.8
install-includes: lua.h
, luaconf.h
, lauxlib.h
, lualib.h
c-sources: cbits/lua-5.4.8/lapi.c
, cbits/lua-5.4.8/lcode.c
, cbits/lua-5.4.8/lctype.c
, cbits/lua-5.4.8/ldebug.c
, cbits/lua-5.4.8/ldo.c
, cbits/lua-5.4.8/ldump.c
, cbits/lua-5.4.8/lfunc.c
, cbits/lua-5.4.8/lgc.c
, cbits/lua-5.4.8/llex.c
, cbits/lua-5.4.8/lmem.c
, cbits/lua-5.4.8/lobject.c
, cbits/lua-5.4.8/lopcodes.c
, cbits/lua-5.4.8/lparser.c
, cbits/lua-5.4.8/lstate.c
, cbits/lua-5.4.8/lstring.c
, cbits/lua-5.4.8/ltable.c
, cbits/lua-5.4.8/ltm.c
, cbits/lua-5.4.8/lundump.c
, cbits/lua-5.4.8/lvm.c
, cbits/lua-5.4.8/lzio.c
, cbits/lua-5.4.8/lauxlib.c
, cbits/lua-5.4.8/lbaselib.c
, cbits/lua-5.4.8/lcorolib.c
, cbits/lua-5.4.8/ldblib.c
, cbits/lua-5.4.8/liolib.c
, cbits/lua-5.4.8/lmathlib.c
, cbits/lua-5.4.8/loadlib.c
, cbits/lua-5.4.8/loslib.c
, cbits/lua-5.4.8/lstrlib.c
, cbits/lua-5.4.8/ltablib.c
, cbits/lua-5.4.8/lutf8lib.c
, cbits/lua-5.4.8/linit.c
if os(linux)
cc-options: -DLUA_USE_LINUX
if flag(export-dynamic)
ld-options: -Wl,-E
if os(darwin)
cc-options: -DLUA_USE_MACOSX
if os(freebsd)
cc-options: -DLUA_USE_POSIX
if flag(export-dynamic)
ld-options: -Wl,-E
test-suite test-lua
import: common-options
type: exitcode-stdio-1.0
main-is: test-lua.hs
hs-source-dirs: test
other-modules: Lua.ErsatzTests
, Lua.PrimaryTests
, Lua.UnsafeTests
build-depends: lua
, tasty >= 0.11
, tasty-hunit >= 0.9