-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | HsLua provides wrappers and helpers to bridge Haskell and <a>Lua</a>.
--   
--   It builds upon the <i>lua</i> package, which allows to bundle a Lua
--   interpreter with a Haskell program.
--   
--   Example programs can be found in the <tt>hslua-examples</tt> subdir of
--   the project <a>repository</a>.
@package hslua
@version 2.4.0


-- | HsLua utility functions.
module HsLua.Util

-- | Like <tt>getglobal</tt>, but knows about packages and nested tables.
--   E.g.
--   
--   <pre>
--   getglobal' "math.sin"
--   </pre>
--   
--   will return the function <tt>sin</tt> in package <tt>math</tt>.
getglobal' :: LuaError e => Name -> LuaE e ()

-- | Like <tt>setglobal</tt>, but knows about packages and nested tables.
--   E.g.
--   
--   <pre>
--   pushstring "0.9.4"
--   setglobal' "mypackage.version"
--   </pre>
--   
--   All tables and fields, except for the last field, must exist.
setglobal' :: LuaError e => Name -> LuaE e ()


-- | Functions and utilities enabling the seamless integration of a Lua
--   interpreter into a Haskell project.
--   
--   This module combines and re-exports the functionality of the HsLua
--   framework. Basic access to the Lua API is provided by
--   <tt><a>Core</a></tt> from Hackage package <i>lua</i>.
module HsLua
checkstack' :: LuaError e => Int -> String -> LuaE e ()
dofile :: Maybe FilePath -> LuaE e Status
dostring :: ByteString -> LuaE e Status
getmetafield :: StackIndex -> Name -> LuaE e Type
getmetatable' :: Name -> LuaE e Type
getref :: LuaError e => StackIndex -> Reference -> LuaE e Type
getsubtable :: LuaError e => StackIndex -> Name -> LuaE e Bool
loadbuffer :: ByteString -> Name -> LuaE e Status
loaded :: Name
loadfile :: Maybe FilePath -> LuaE e Status
loadstring :: ByteString -> LuaE e Status
newmetatable :: Name -> LuaE e Bool
newstate :: IO State
preload :: Name
ref :: StackIndex -> LuaE e Reference
requiref :: LuaError e => Name -> CFunction -> Bool -> LuaE e ()
tostring' :: LuaError e => StackIndex -> LuaE e ByteString
traceback :: State -> Maybe ByteString -> Int -> LuaE e ()
unref :: StackIndex -> Reference -> LuaE e ()
where' :: Int -> LuaE e ()
pushHaskellFunction :: LuaError e => HaskellFunction e -> LuaE e ()
pushPreCFunction :: PreCFunction -> LuaE e ()
getupvalue :: StackIndex -> Int -> LuaE e (Maybe Name)
setupvalue :: StackIndex -> Int -> LuaE e (Maybe Name)
changeErrorType :: forall old new a. LuaE old a -> LuaE new a
failLua :: LuaError e => String -> LuaE e a
popErrorMessage :: State -> IO ByteString
pushTypeMismatchError :: ByteString -> StackIndex -> LuaE e ()
throwErrorAsException :: LuaError e => LuaE e a
throwTypeMismatchError :: LuaError e => ByteString -> StackIndex -> LuaE e a
try :: Exception e => LuaE e a -> LuaE e (Either e a)
preloadhs :: LuaError e => Name -> LuaE e NumResults -> LuaE e ()
requirehs :: LuaError e => Name -> (Name -> LuaE e ()) -> LuaE e ()
absindex :: StackIndex -> LuaE e StackIndex
call :: LuaError e => NumArgs -> NumResults -> LuaE e ()
checkstack :: Int -> LuaE e Bool
close :: State -> IO ()
compare :: LuaError e => StackIndex -> StackIndex -> RelationalOperator -> LuaE e Bool
concat :: LuaError e => NumArgs -> LuaE e ()
copy :: StackIndex -> StackIndex -> LuaE e ()
createtable :: Int -> Int -> LuaE e ()
equal :: LuaError e => StackIndex -> StackIndex -> LuaE e Bool
error :: LuaE e NumResults
gc :: GCControl -> LuaE e Int
getfield :: LuaError e => StackIndex -> Name -> LuaE e Type
getglobal :: LuaError e => Name -> LuaE e Type
getiuservalue :: StackIndex -> Int -> LuaE e Type
getmetatable :: StackIndex -> LuaE e Bool
gettable :: LuaError e => StackIndex -> LuaE e Type
gettop :: LuaE e StackIndex
insert :: StackIndex -> LuaE e ()
isboolean :: StackIndex -> LuaE e Bool
iscfunction :: StackIndex -> LuaE e Bool
isfunction :: StackIndex -> LuaE e Bool
isinteger :: StackIndex -> LuaE e Bool
islightuserdata :: StackIndex -> LuaE e Bool
isnil :: StackIndex -> LuaE e Bool
isnone :: StackIndex -> LuaE e Bool
isnoneornil :: StackIndex -> LuaE e Bool
isnumber :: StackIndex -> LuaE e Bool
isstring :: StackIndex -> LuaE e Bool
istable :: StackIndex -> LuaE e Bool
isthread :: StackIndex -> LuaE e Bool
isuserdata :: StackIndex -> LuaE e Bool
lessthan :: LuaError e => StackIndex -> StackIndex -> LuaE e Bool
load :: Reader -> Ptr () -> Name -> LuaE e Status
ltype :: StackIndex -> LuaE e Type
newtable :: LuaE e ()
newuserdatauv :: Int -> Int -> LuaE e (Ptr ())
next :: LuaError e => StackIndex -> LuaE e Bool
openbase :: LuaError e => LuaE e ()
opendebug :: LuaError e => LuaE e ()
openio :: LuaError e => LuaE e ()
openlibs :: LuaE e ()
openmath :: LuaError e => LuaE e ()
openos :: LuaError e => LuaE e ()
openpackage :: LuaError e => LuaE e ()
openstring :: LuaError e => LuaE e ()
opentable :: LuaError e => LuaE e ()
pcall :: NumArgs -> NumResults -> Maybe StackIndex -> LuaE e Status
pop :: Int -> LuaE e ()
pushboolean :: Bool -> LuaE e ()
pushcclosure :: CFunction -> NumArgs -> LuaE e ()
pushcfunction :: CFunction -> LuaE e ()
pushglobaltable :: LuaE e ()
pushinteger :: Integer -> LuaE e ()
pushlightuserdata :: Ptr a -> LuaE e ()
pushnil :: LuaE e ()
pushnumber :: Number -> LuaE e ()
pushstring :: ByteString -> LuaE e ()
pushthread :: LuaE e Bool
pushvalue :: StackIndex -> LuaE e ()
rawequal :: StackIndex -> StackIndex -> LuaE e Bool
rawget :: LuaError e => StackIndex -> LuaE e Type
rawgeti :: LuaError e => StackIndex -> Integer -> LuaE e Type
rawlen :: StackIndex -> LuaE e Int
rawset :: LuaError e => StackIndex -> LuaE e ()
rawseti :: LuaError e => StackIndex -> Integer -> LuaE e ()
register :: LuaError e => Name -> CFunction -> LuaE e ()
remove :: StackIndex -> LuaE e ()
replace :: StackIndex -> LuaE e ()
rotate :: StackIndex -> Int -> LuaE e ()
setfield :: LuaError e => StackIndex -> Name -> LuaE e ()
setglobal :: LuaError e => Name -> LuaE e ()
setiuservalue :: StackIndex -> Int -> LuaE e Bool
setmetatable :: StackIndex -> LuaE e ()
settable :: LuaError e => StackIndex -> LuaE e ()
settop :: StackIndex -> LuaE e ()
setwarnf :: WarnFunction -> Ptr () -> LuaE e ()
status :: LuaE e Status
toboolean :: StackIndex -> LuaE e Bool
tocfunction :: StackIndex -> LuaE e (Maybe CFunction)
tointeger :: StackIndex -> LuaE e (Maybe Integer)
tonumber :: StackIndex -> LuaE e (Maybe Number)
topointer :: StackIndex -> LuaE e (Ptr ())
tostring :: StackIndex -> LuaE e (Maybe ByteString)
tothread :: StackIndex -> LuaE e (Maybe State)
touserdata :: StackIndex -> LuaE e (Maybe (Ptr a))
typename :: Type -> LuaE e ByteString
upvalueindex :: StackIndex -> StackIndex
closeGCManagedState :: GCManagedState -> IO ()
newGCManagedState :: IO GCManagedState
run :: LuaE e a -> IO a
runEither :: Exception e => LuaE e a -> IO (Either e a)
withGCManagedState :: GCManagedState -> LuaE e a -> IO a
callTrace :: LuaError e => NumArgs -> NumResults -> LuaE e ()
dofileTrace :: Maybe FilePath -> LuaE e Status
dostringTrace :: ByteString -> LuaE e Status
pcallTrace :: NumArgs -> NumResults -> LuaE e Status
multret :: NumResults
noref :: Int
refnil :: Int
registryindex :: StackIndex
runWith :: State -> LuaE e a -> IO a
state :: LuaE e State
unsafeRunWith :: State -> LuaE e a -> IO a
fromuserdata :: forall a e. StackIndex -> Name -> LuaE e (Maybe a)
newhsuserdatauv :: a -> Int -> LuaE e ()
newudmetatable :: Name -> LuaE e Bool
putuserdata :: StackIndex -> Name -> a -> LuaE e Bool
setwarnf' :: LuaError e => (ByteString -> LuaE e ()) -> LuaE e ()
nth :: CInt -> StackIndex
nthBottom :: CInt -> StackIndex
nthTop :: CInt -> StackIndex
top :: StackIndex
fromReference :: Reference -> CInt
toReference :: CInt -> Reference
liftIO :: MonadIO m => IO a -> m a
newtype Exception
Exception :: String -> Exception
[exceptionMessage] :: Exception -> String
type Lua a = LuaE Exception a
class Exception e => LuaError e
popException :: LuaError e => LuaE e e
pushException :: LuaError e => e -> LuaE e ()
luaException :: LuaError e => String -> e
data GCManagedState
data GCControl
GCStop :: GCControl
GCRestart :: GCControl
GCCollect :: GCControl
GCCount :: GCControl
GCCountb :: GCControl
GCStep :: CInt -> GCControl
GCInc :: CInt -> CInt -> CInt -> GCControl
GCGen :: CInt -> CInt -> GCControl
GCIsRunning :: GCControl
type HaskellFunction e = LuaE e NumResults
newtype LuaE e a
Lua :: ReaderT LuaEnvironment IO a -> LuaE e a
[unLua] :: LuaE e a -> ReaderT LuaEnvironment IO a
newtype LuaEnvironment
LuaEnvironment :: State -> LuaEnvironment
[luaEnvState] :: LuaEnvironment -> State
newtype Name
Name :: ByteString -> Name
[fromName] :: Name -> ByteString
data RelationalOperator
EQ :: RelationalOperator
LT :: RelationalOperator
LE :: RelationalOperator
data Status
OK :: Status
Yield :: Status
ErrRun :: Status
ErrSyntax :: Status
ErrMem :: Status
ErrErr :: Status
ErrFile :: Status
data Type
TypeNone :: Type
TypeNil :: Type
TypeBoolean :: Type
TypeLightUserdata :: Type
TypeNumber :: Type
TypeString :: Type
TypeTable :: Type
TypeFunction :: Type
TypeUserdata :: Type
TypeThread :: Type
data Reference
Reference :: CInt -> Reference
RefNil :: Reference
type CFunction = FunPtr PreCFunction
newtype Integer
Integer :: Int64 -> Integer
newtype NumArgs
NumArgs :: CInt -> NumArgs
[fromNumArgs] :: NumArgs -> CInt
newtype NumResults
NumResults :: CInt -> NumResults
[fromNumResults] :: NumResults -> CInt
newtype Number
Number :: Double -> Number
type PreCFunction = State -> IO NumResults
newtype StackIndex
StackIndex :: CInt -> StackIndex
[fromStackIndex] :: StackIndex -> CInt
newtype State
State :: Ptr () -> State
cleanup :: Peek e a -> Peek e a
failPeek :: forall a e. ByteString -> Peek e a
failure :: ByteString -> Result a
force :: LuaError e => Result a -> LuaE e a
forcePeek :: LuaError e => Peek e a -> LuaE e a
lastly :: Peek e a -> LuaE e b -> Peek e a
liftLua :: LuaE e a -> Peek e a
resultToEither :: Result a -> Either String a
retrieving :: Name -> Peek e a -> Peek e a
runPeeker :: Peeker e a -> StackIndex -> LuaE e (Result a)
withContext :: Name -> Peek e a -> Peek e a
choice :: LuaError e => [Peeker e a] -> Peeker e a
peekBool :: Peeker e Bool
peekByteString :: Peeker e ByteString
peekFieldRaw :: LuaError e => Peeker e a -> Name -> Peeker e a
peekIntegral :: (Integral a, Read a) => Peeker e a
peekKeyValuePairs :: LuaError e => Peeker e a -> Peeker e b -> Peeker e [(a, b)]
peekLazyByteString :: Peeker e ByteString
peekList :: forall a e. LuaError e => Peeker e a -> Peeker e [a]
peekMap :: (LuaError e, Ord a) => Peeker e a -> Peeker e b -> Peeker e (Map a b)
peekName :: Peeker e Name
peekNil :: Peeker e ()
peekNilOr :: Alternative m => Peeker e a -> Peeker e (m a)
peekNoneOr :: Alternative m => Peeker e a -> Peeker e (m a)
peekNoneOrNil :: Peeker e ()
peekNoneOrNilOr :: Alternative m => Peeker e a -> Peeker e (m a)
peekPair :: LuaError e => Peeker e a -> Peeker e b -> Peeker e (a, b)
peekRead :: Read a => Peeker e a
peekRealFloat :: (RealFloat a, Read a) => Peeker e a
peekSet :: (LuaError e, Ord a) => Peeker e a -> Peeker e (Set a)
peekString :: Peeker e String
peekStringy :: IsString a => Peeker e a
peekText :: Peeker e Text
peekTriple :: LuaError e => Peeker e a -> Peeker e b -> Peeker e c -> Peeker e (a, b, c)
reportValueOnFailure :: Name -> (StackIndex -> LuaE e (Maybe a)) -> Peeker e a
typeChecked :: Name -> (StackIndex -> LuaE e Bool) -> Peeker e a -> Peeker e a
typeMismatchMessage :: Name -> StackIndex -> Peek e ByteString
pushAsTable :: LuaError e => [(Name, a -> LuaE e ())] -> a -> LuaE e ()
pushBool :: Pusher e Bool
pushByteString :: Pusher e ByteString
pushIntegral :: (Integral a, Show a) => a -> LuaE e ()
pushKeyValuePairs :: LuaError e => Pusher e a -> Pusher e b -> Pusher e [(a, b)]
pushLazyByteString :: Pusher e ByteString
pushList :: LuaError e => Pusher e a -> [a] -> LuaE e ()
pushMap :: LuaError e => Pusher e a -> Pusher e b -> Pusher e (Map a b)
pushName :: Name -> LuaE e ()
pushNonEmpty :: LuaError e => Pusher e a -> NonEmpty a -> LuaE e ()
pushPair :: LuaError e => Pusher e a -> Pusher e b -> (a, b) -> LuaE e ()
pushRealFloat :: RealFloat a => a -> LuaE e ()
pushSet :: LuaError e => Pusher e a -> Pusher e (Set a)
pushString :: String -> LuaE e ()
pushText :: Pusher e Text
pushTriple :: LuaError e => Pusher e a -> Pusher e b -> Pusher e c -> (a, b, c) -> LuaE e ()
pushIterator :: forall a e. LuaError e => (a -> LuaE e NumResults) -> [a] -> LuaE e NumResults
newtype Peek e a
Peek :: LuaE e (Result a) -> Peek e a
[runPeek] :: Peek e a -> LuaE e (Result a)
type Peeker e a = StackIndex -> Peek e a
data Result a
Success :: !a -> Result a
Failure :: ByteString -> [Name] -> Result a
type Pusher e a = a -> LuaE e ()
deftypeGeneric :: Pusher e fn -> Name -> [(Operation, fn)] -> [Member e fn a] -> UDType e fn a
alias :: AliasIndex -> Text -> [AliasIndex] -> Member e fn a
deftypeGeneric' :: Pusher e fn -> Name -> [(Operation, fn)] -> [Member e fn a] -> UDTypeHooks e fn a -> UDTypeGeneric e fn a
emptyHooks :: UDTypeHooks e fn a
initType :: LuaError e => UDTypeGeneric e fn a -> LuaE e Name
methodGeneric :: Name -> fn -> Member e fn a
peekUDGeneric :: LuaError e => UDTypeGeneric e fn a -> Peeker e a
possibleProperty :: LuaError e => Name -> Text -> (Pusher e b, a -> Possible b) -> (Peeker e b, a -> b -> Possible a) -> Member e fn a
possibleProperty' :: LuaError e => Name -> TypeSpec -> Text -> (Pusher e b, a -> Possible b) -> (Peeker e b, a -> b -> Possible a) -> Member e fn a
property :: LuaError e => Name -> Text -> (Pusher e b, a -> b) -> (Peeker e b, a -> b -> a) -> Member e fn a
property' :: LuaError e => Name -> TypeSpec -> Text -> (Pusher e b, a -> b) -> (Peeker e b, a -> b -> a) -> Member e fn a
pushUDGeneric :: LuaError e => UDTypeGeneric e fn a -> a -> LuaE e ()
readonly :: Name -> Text -> (Pusher e b, a -> b) -> Member e fn a
readonly' :: Name -> TypeSpec -> Text -> (Pusher e b, a -> b) -> Member e fn a
udDocs :: UDTypeGeneric e fn a -> TypeDocs
udTypeSpec :: UDTypeGeneric e fn a -> TypeSpec
listExtension :: LuaError e => ListSpec e a itemtype -> UDTypeHooks e fn a
type UDType e fn a = UDTypeGeneric e fn a
type Alias = [AliasIndex]
data AliasIndex
StringIndex :: Name -> AliasIndex
IntegerIndex :: Integer -> AliasIndex
data Member e fn a
data Possible a
Actual :: a -> Possible a
Absent :: Possible a
data Property e a
Property :: (a -> LuaE e NumResults) -> Maybe (StackIndex -> a -> LuaE e a) -> Text -> TypeSpec -> Property e a
[propertyGet] :: Property e a -> a -> LuaE e NumResults
[propertySet] :: Property e a -> Maybe (StackIndex -> a -> LuaE e a)
[propertyDescription] :: Property e a -> Text
[propertyType] :: Property e a -> TypeSpec
data UDTypeGeneric e fn a
UDType :: Name -> [(Operation, fn)] -> Map Name (Property e a) -> Map Name fn -> Map AliasIndex Alias -> UDTypeHooks e fn a -> (fn -> LuaE e ()) -> UDTypeGeneric e fn a
[udName] :: UDTypeGeneric e fn a -> Name
[udOperations] :: UDTypeGeneric e fn a -> [(Operation, fn)]
[udProperties] :: UDTypeGeneric e fn a -> Map Name (Property e a)
[udMethods] :: UDTypeGeneric e fn a -> Map Name fn
[udAliases] :: UDTypeGeneric e fn a -> Map AliasIndex Alias
[udHooks] :: UDTypeGeneric e fn a -> UDTypeHooks e fn a
[udFnPusher] :: UDTypeGeneric e fn a -> fn -> LuaE e ()
data UDTypeHooks e fn a
UDTypeHooks :: Int -> LuaE e () -> (a -> StackIndex -> Peek e a) -> (a -> LuaE e ()) -> UDTypeHooks e fn a
[hookUservalues] :: UDTypeHooks e fn a -> Int
[hookMetatableSetup] :: UDTypeHooks e fn a -> LuaE e ()
[hookPeekUD] :: UDTypeHooks e fn a -> a -> StackIndex -> Peek e a
[hookPushUD] :: UDTypeHooks e fn a -> a -> LuaE e ()
type ListSpec e a itemtype = ((Pusher e itemtype, a -> [itemtype]), (Peeker e itemtype, a -> [itemtype] -> a))
type UDTypeWithList e fn a itemtype = UDTypeGeneric e fn a
data Operation
Add :: Operation
Sub :: Operation
Mul :: Operation
Div :: Operation
Mod :: Operation
Pow :: Operation
Unm :: Operation
Idiv :: Operation
Band :: Operation
Bor :: Operation
Bxor :: Operation
Bnot :: Operation
Shl :: Operation
Shr :: Operation
Concat :: Operation
Len :: Operation
Eq :: Operation
Lt :: Operation
Le :: Operation
Index :: Operation
Newindex :: Operation
Call :: Operation
Tostring :: Operation
Pairs :: Operation
CustomOperation :: Name -> Operation
alias :: AliasIndex -> Text -> [AliasIndex] -> Member e fn a
initType :: LuaError e => UDTypeGeneric e fn a -> LuaE e Name
possibleProperty :: LuaError e => Name -> Text -> (Pusher e b, a -> Possible b) -> (Peeker e b, a -> b -> Possible a) -> Member e fn a
possibleProperty' :: LuaError e => Name -> TypeSpec -> Text -> (Pusher e b, a -> Possible b) -> (Peeker e b, a -> b -> Possible a) -> Member e fn a
property :: LuaError e => Name -> Text -> (Pusher e b, a -> b) -> (Peeker e b, a -> b -> a) -> Member e fn a
property' :: LuaError e => Name -> TypeSpec -> Text -> (Pusher e b, a -> b) -> (Peeker e b, a -> b -> a) -> Member e fn a
readonly :: Name -> Text -> (Pusher e b, a -> b) -> Member e fn a
readonly' :: Name -> TypeSpec -> Text -> (Pusher e b, a -> b) -> Member e fn a
udDocs :: UDTypeGeneric e fn a -> TypeDocs
udTypeSpec :: UDTypeGeneric e fn a -> TypeSpec
boolParam :: Text -> Text -> Parameter e Bool
boolResult :: Text -> FunctionResults e Bool
integralParam :: (Read a, Integral a) => Text -> Text -> Parameter e a
integralResult :: (Integral a, Show a) => Text -> FunctionResults e a
stringParam :: Text -> Text -> Parameter e String
stringResult :: Text -> FunctionResults e String
textParam :: Text -> Text -> Parameter e Text
textResult :: Text -> FunctionResults e Text
docsField :: Name
documentation :: LuaError e => DocumentedFunction e
getdocumentation :: LuaError e => StackIndex -> LuaE e Type
pushFieldDoc :: LuaError e => Pusher e (Field e)
pushFunctionDoc :: LuaError e => Pusher e (DocumentedFunction e)
pushModuleDoc :: LuaError e => Pusher e (Module e)
registerDocumentation :: LuaError e => StackIndex -> LuaE e ()
(###) :: (a -> HsFnPrecursor e a) -> a -> HsFnPrecursor e a
(#?) :: DocumentedFunction e -> Text -> DocumentedFunction e
(<#>) :: HsFnPrecursor e (a -> b) -> Parameter e a -> HsFnPrecursor e b
(=#>) :: HsFnPrecursor e (LuaE e a) -> FunctionResults e a -> DocumentedFunction e
(=?>) :: HsFnPrecursor e (LuaE e NumResults) -> Text -> DocumentedFunction e
applyParameter :: HsFnPrecursor e (a -> b) -> Parameter e a -> HsFnPrecursor e b
defun :: Name -> a -> HsFnPrecursor e a
functionResult :: Pusher e a -> TypeSpec -> Text -> FunctionResults e a
lambda :: a -> HsFnPrecursor e a
liftPure :: (a -> b) -> a -> LuaE e b
liftPure2 :: (a -> b -> c) -> a -> b -> LuaE e c
liftPure3 :: (a -> b -> c -> d) -> a -> b -> c -> LuaE e d
liftPure4 :: (a -> b -> c -> d -> e) -> a -> b -> c -> d -> LuaE err e
liftPure5 :: (a -> b -> c -> d -> e -> f) -> a -> b -> c -> d -> e -> LuaE err f
opt :: Parameter e a -> Parameter e (Maybe a)
optionalParameter :: Peeker e a -> TypeSpec -> Text -> Text -> Parameter e (Maybe a)
parameter :: Peeker e a -> TypeSpec -> Text -> Text -> Parameter e a
pushDocumentedFunction :: LuaError e => DocumentedFunction e -> LuaE e ()
returnResult :: HsFnPrecursor e (LuaE e a) -> FunctionResult e a -> DocumentedFunction e
returnResults :: HsFnPrecursor e (LuaE e a) -> FunctionResults e a -> DocumentedFunction e
returnResultsOnStack :: HsFnPrecursor e (LuaE e NumResults) -> Text -> DocumentedFunction e
setName :: Name -> DocumentedFunction e -> DocumentedFunction e
since :: DocumentedFunction e -> Version -> DocumentedFunction e
toHsFnPrecursor :: StackIndex -> Name -> a -> HsFnPrecursor e a
updateFunctionDescription :: DocumentedFunction e -> Text -> DocumentedFunction e
preloadModule :: LuaError e => Module e -> LuaE e ()
preloadModuleWithName :: LuaError e => Module e -> Name -> LuaE e ()
pushModule :: LuaError e => Module e -> LuaE e ()
registerModule :: LuaError e => Module e -> LuaE e ()
deftype :: LuaError e => Name -> [(Operation, DocumentedFunction e)] -> [Member e (DocumentedFunction e) a] -> DocumentedType e a
deftype' :: LuaError e => Name -> [(Operation, DocumentedFunction e)] -> [Member e (DocumentedFunction e) a] -> Maybe (ListSpec e a itemtype) -> DocumentedTypeWithList e a itemtype
method :: DocumentedFunction e -> Member e (DocumentedFunction e) a
operation :: Operation -> DocumentedFunction e -> (Operation, DocumentedFunction e)
peekUD :: LuaError e => DocumentedTypeWithList e a itemtype -> Peeker e a
pushUD :: LuaError e => DocumentedTypeWithList e a itemtype -> a -> LuaE e ()
udparam :: LuaError e => DocumentedTypeWithList e a itemtype -> Text -> Text -> Parameter e a
udresult :: LuaError e => DocumentedTypeWithList e a itemtype -> Text -> FunctionResults e a
data Member e fn a
data Possible a
Actual :: a -> Possible a
Absent :: Possible a
data Property e a
data Operation
Add :: Operation
Sub :: Operation
Mul :: Operation
Div :: Operation
Mod :: Operation
Pow :: Operation
Unm :: Operation
Idiv :: Operation
Band :: Operation
Bor :: Operation
Bxor :: Operation
Bnot :: Operation
Shl :: Operation
Shr :: Operation
Concat :: Operation
Len :: Operation
Eq :: Operation
Lt :: Operation
Le :: Operation
Index :: Operation
Newindex :: Operation
Call :: Operation
Tostring :: Operation
Pairs :: Operation
CustomOperation :: Name -> Operation
data FunctionResult e a
FunctionResult :: Pusher e a -> ResultValueDoc -> FunctionResult e a
[fnResultPusher] :: FunctionResult e a -> Pusher e a
[fnResultDoc] :: FunctionResult e a -> ResultValueDoc
type FunctionResults e a = [FunctionResult e a]
data HsFnPrecursor e a
data Parameter e a
Parameter :: Peeker e a -> ParameterDoc -> Parameter e a
[parameterPeeker] :: Parameter e a -> Peeker e a
[parameterDoc] :: Parameter e a -> ParameterDoc
data DocumentedFunction e
DocumentedFunction :: LuaE e NumResults -> Name -> FunctionDoc -> DocumentedFunction e
[callFunction] :: DocumentedFunction e -> LuaE e NumResults
[functionName] :: DocumentedFunction e -> Name
[functionDoc] :: DocumentedFunction e -> FunctionDoc
data Field e
Field :: Text -> TypeSpec -> Text -> LuaE e () -> Field e
[fieldName] :: Field e -> Text
[fieldType] :: Field e -> TypeSpec
[fieldDescription] :: Field e -> Text
[fieldPushValue] :: Field e -> LuaE e ()
data FunctionDoc
FunctionDoc :: Text -> [ParameterDoc] -> ResultsDoc -> Maybe Version -> FunctionDoc
[functionDescription] :: FunctionDoc -> Text
[parameterDocs] :: FunctionDoc -> [ParameterDoc]
[functionResultsDocs] :: FunctionDoc -> ResultsDoc
[functionSince] :: FunctionDoc -> Maybe Version
data Module e
Module :: Name -> Text -> [Field e] -> [DocumentedFunction e] -> [(Operation, DocumentedFunction e)] -> [LuaE e Name] -> Module e
[moduleName] :: Module e -> Name
[moduleDescription] :: Module e -> Text
[moduleFields] :: Module e -> [Field e]
[moduleFunctions] :: Module e -> [DocumentedFunction e]
[moduleOperations] :: Module e -> [(Operation, DocumentedFunction e)]
[moduleTypeInitializers] :: Module e -> [LuaE e Name]
data ParameterDoc
ParameterDoc :: Text -> TypeSpec -> Text -> Bool -> ParameterDoc
[parameterName] :: ParameterDoc -> Text
[parameterType] :: ParameterDoc -> TypeSpec
[parameterDescription] :: ParameterDoc -> Text
[parameterIsOptional] :: ParameterDoc -> Bool
data ResultValueDoc
ResultValueDoc :: TypeSpec -> Text -> ResultValueDoc
[resultValueType] :: ResultValueDoc -> TypeSpec
[resultValueDescription] :: ResultValueDoc -> Text
data ResultsDoc
ResultsDocList :: [ResultValueDoc] -> ResultsDoc
ResultsDocMult :: Text -> ResultsDoc
type DocumentedType e a = UDType e DocumentedFunction e a
type DocumentedTypeWithList e a itemtype = UDTypeWithList e DocumentedFunction e a itemtype
pushAsHaskellFunction :: Exposable e a => a -> LuaE e ()
registerHaskellFunction :: Exposable e a => Name -> a -> LuaE e ()
toHaskellFunction :: Exposable e a => a -> HaskellFunction e
class LuaError e => Exposable e a
partialApply :: Exposable e a => StackIndex -> a -> Peek e NumResults
invoke :: Invokable a => Name -> a
class Invokable a
addArg :: Invokable a => Name -> (forall e. LuaError e => LuaE e ()) -> NumArgs -> a
peek :: forall a e. (LuaError e, Peekable a) => StackIndex -> LuaE e a
class Peekable a
safepeek :: (Peekable a, LuaError e) => Peeker e a
class Pushable a
push :: (Pushable a, LuaError e) => a -> LuaE e ()
jsonarray :: Name
peekToAeson :: Peeker e (ToAeson e)
peekValue :: LuaError e => Peeker e Value
peekViaJSON :: (FromJSON a, LuaError e) => Peeker e a
pushToAeson :: Pusher e (ToAeson e)
pushValue :: LuaError e => Pusher e Value
pushViaJSON :: (ToJSON a, LuaError e) => Pusher e a

-- | Like <tt>getglobal</tt>, but knows about packages and nested tables.
--   E.g.
--   
--   <pre>
--   getglobal' "math.sin"
--   </pre>
--   
--   will return the function <tt>sin</tt> in package <tt>math</tt>.
getglobal' :: LuaError e => Name -> LuaE e ()

-- | Like <tt>setglobal</tt>, but knows about packages and nested tables.
--   E.g.
--   
--   <pre>
--   pushstring "0.9.4"
--   setglobal' "mypackage.version"
--   </pre>
--   
--   All tables and fields, except for the last field, must exist.
setglobal' :: LuaError e => Name -> LuaE e ()
peekEither :: (LuaError e, Peekable a) => StackIndex -> LuaE e (Either e a)
popValue :: (LuaError e, Peekable a) => LuaE e a
raiseError :: (LuaError e, Pushable a) => a -> LuaE e NumResults
newtype Optional a
Optional :: Maybe a -> Optional a
[fromOptional] :: Optional a -> Maybe a
