HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehslua-marshalling-2.3.1Haskell2010

HsLua.Marshalling.Peek

Types for unmarshalling of values from Lua.

  • 3 types
  • 13 values
datadata Result a
#

Record to keep track of failure contexts while retrieving objects from the Lua stack.

Constructors

Instances10Monad, Functor, MonadFail, Applicative, Foldable, Traversable, …
  • Monad ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Functor ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • MonadFail ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Applicative ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Foldable ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Traversable ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Alternative ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • MonadPlus ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Eq a => Eq (Result a)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Show a => Show (Result a)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
valueforce :: LuaError e => Result a -> LuaE e a
#

Force creation of an unwrapped result, throwing an exception if that's not possible.

Lua peek monad

7 declarations
newtypenewtype Peek e a
#

Lua operation with an additional failure mode that can stack errors from different contexts; errors are not based on exceptions).

Constructors

Instances6Monad, Functor, MonadFail, Applicative, Alternative, MonadPlus
  • Monad (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Functor (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • MonadFail (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Applicative (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • Alternative (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
  • MonadPlus (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
valueforcePeek :: LuaError e => Peek e a -> LuaE e a
#

Converts a Peek action into a LuaE action, throwing an exception in case of a peek failure.

valueliftLua :: LuaE e a -> Peek e a
#

Lifts a Lua operation into the Peek monad.

valuelastly :: Peek e a -> LuaE e b -> Peek e a
#

Runs the peek action and Lua action in sequence, even if the peek action fails.

valuecleanup :: Peek e a -> Peek e a
#

Runs the peek action, resetting the stack top afterwards. This can be used with peek actions that might otherwise leave elements on the stack in case of a failure.