HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulehslua-core-2.3.2.1Haskell2010

HsLua.Core.Run

Helper functions to run LuaE computations.

Contents
  1. GCManaged state
Synopsis
valuerun :: LuaE e a -> IO a

Run Lua computation using the default HsLua state as starting point. Exceptions are masked, thus avoiding some issues when using multiple threads. All exceptions are passed through; error handling is the responsibility of the caller.

valuerunEither :: Exception e => LuaE e a -> IO (Either e a)

Run the given Lua computation; exceptions raised in Haskell code are caught, but other exceptions (user exceptions raised in Haskell, unchecked type errors, etc.) are passed through.

valuerunWith :: State -> LuaE e a -> IO a

Run Lua computation with the given Lua state. Exception handling is left to the caller; resulting exceptions are left unhandled.

GCManaged state

newtypenewtype GCManagedState

Wrapper of a Lua state whose lifetime is managed by the Haskell garbage collector and has a finalizer attached. This means that the state does not have to be closed explicitly, but will be closed automatically when the value is garbage collected in Haskell.