Function to retrieve a value from Lua's stack.
Modulehslua-marshalling-2.3.1Haskell2010
HsLua.Marshalling.Peek
Types for unmarshalling of values from Lua.
- 3 types
- 13 values
- Packagehslua-marshalling-2.3.1
- Exports16
- LanguageHaskell2010
- LicenceMIT
- SourcePeek.hs
Runs the peeker function.
Record to keep track of failure contexts while retrieving objects from the Lua stack.
Constructors
Success !aFailure ByteString [Name]Error message and stack of contexts
Instances10Monad, Functor, MonadFail, Applicative, Foldable, Traversable, …
Monad ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekFunctor ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekMonadFail ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekApplicative ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekFoldable ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekTraversable ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekAlternative ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekMonadPlus ResultDefined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekEq a => Eq (Result a)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekShow a => Show (Result a)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
Returns True iff the peek result is a Failure.
Create a peek failure record from an error message.
Force creation of an unwrapped result, throwing an exception if that's not possible.
Add context information to the peek traceback stack.
Converts a Result into an Either, where Left holds the reportable
string in case of an failure.
Converts an old peek funtion to a Peeker.
Lua peek monad
7 declarationsLua operation with an additional failure mode that can stack errors from different contexts; errors are not based on exceptions).
Instances6Monad, Functor, MonadFail, Applicative, Alternative, MonadPlus
Monad (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekFunctor (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekMonadFail (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekApplicative (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekAlternative (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.PeekMonadPlus (Peek e)Defined in hslua-marshalling-2.3.1 · HsLua.Marshalling.Peek
Converts a Peek action into a LuaE action, throwing an exception in case of a peek failure.
Fails the peek operation.
Lifts a Lua operation into the Peek monad.
Transform the result using the given function.
Runs the peek action and Lua action in sequence, even if the peek action fails.
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.