HsLua.Class.Peekable

hslua-classes-2.3.1: Type classes for HsLua

Copyright | © 2007–2012 Gracjan Polak; © 2012–2016 Ömer Sinan Ağacan; © 2017-2024 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb@hslua.org>
Stability | beta
Portability | non-portable (depends on GHC)
Safe Haskell | None
Language | Haskell2010

HsLua.Class.Peekable

Description

Sending haskell objects to the lua stack.

Synopsis

- class Peekable a where
  - safepeek :: LuaError e => Peeker e a
- peek :: forall a e. (LuaError e, Peekable a) => StackIndex -> LuaE e a

# Documentation

class Peekable a where #

A value that can be read from the Lua stack.

Methods

safepeek :: LuaError e => Peeker e a #

Function that retrieves a value from the Lua stack.

#### Instances

Instances details

Peekable ByteString # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e ByteString #
Peekable ByteString # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e ByteString #
Peekable CFunction # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e CFunction #
Peekable Integer # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e Integer #
Peekable Number # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e Number #
Peekable State # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e State #
Peekable Text # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e Text #
Peekable Integer # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e Integer #
Peekable () # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e () #
Peekable Bool # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e Bool #
Peekable Double # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e Double #
Peekable Float # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e Float #
Peekable Int # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e Int #
(Ord a, Peekable a) => Peekable (Set a) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e (Set a) #
Peekable (Ptr a) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e (Ptr a) #
Peekable a => Peekable (Optional a) # |
Instance details Defined in HsLua.Class.Util Methods safepeek :: LuaError e => Peeker e (Optional a) #
Peekable [Char] # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e [Char] #
Peekable a => Peekable [a] # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e [a] #
(Ord a, Peekable a, Peekable b) => Peekable (Map a b) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e (Map a b) #
(Peekable a, Peekable b) => Peekable (a, b) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e (a, b) #
(Peekable a, Peekable b, Peekable c) => Peekable (a, b, c) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e (a, b, c) #
(Peekable a, Peekable b, Peekable c, Peekable d) => Peekable (a, b, c, d) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e => Peeker e (a, b, c, d) #
(Peekable a, Peekable b, Peekable c, Peekable d, Peekable e) => Peekable (a, b, c, d, e) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e0 => Peeker e0 (a, b, c, d, e) #
(Peekable a, Peekable b, Peekable c, Peekable d, Peekable e, Peekable f) => Peekable (a, b, c, d, e, f) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e0 => Peeker e0 (a, b, c, d, e, f) #
(Peekable a, Peekable b, Peekable c, Peekable d, Peekable e, Peekable f, Peekable g) => Peekable (a, b, c, d, e, f, g) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e0 => Peeker e0 (a, b, c, d, e, f, g) #
(Peekable a, Peekable b, Peekable c, Peekable d, Peekable e, Peekable f, Peekable g, Peekable h) => Peekable (a, b, c, d, e, f, g, h) # |
Instance details Defined in HsLua.Class.Peekable Methods safepeek :: LuaError e0 => Peeker e0 (a, b, c, d, e, f, g, h) #

peek :: forall a e. (LuaError e, Peekable a) => StackIndex -> LuaE e a #

Retrieves a `Peekable` value from the stack. Throws an exception of type `e` if the given stack index does not a suitable value.