Copyright | © 2007–2012 Gracjan Polak 2012–2016 Ömer Sinan Ağacan 2017 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <tarleb+hslua@zeitkraut.de> |
Stability | beta |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
HsLua utility functions.
- getglobal' :: String -> Lua ()
- runLua :: Lua a -> IO a
- runLuaEither :: Lua a -> IO (Either LuaException a)
Documentation
getglobal' :: String -> Lua () Source #
Like getglobal
, but knows about packages. e. g.
getglobal' l "math.sin"
returns correct result
runLua :: Lua a -> IO a Source #
Run lua computation using the default HsLua state as starting point. Raised exceptions are passed through; error handling is the responsibility of the caller.
runLuaEither :: Lua a -> IO (Either LuaException a) Source #
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.