Safe Haskell | None |
---|
- type RValue = Ptr CULong
- type RID = CULong
- data ShimDispatch = ShimDispatch String String [RValue]
- data RBuiltin
- data RType
- type Registered0 = IO RValue
- type Registered1 = RValue -> IO RValue
- type Registered2 = RValue -> RValue -> IO RValue
- mkRegistered0 :: Registered0 -> IO (FunPtr Registered0)
- mkRegistered1 :: Registered1 -> IO (FunPtr Registered1)
- mkRegistered2 :: Registered2 -> IO (FunPtr Registered2)
- type RegisteredCB3 = RValue -> RValue -> RValue -> IO Int
- mkRegisteredCB3 :: RegisteredCB3 -> IO (FunPtr RegisteredCB3)
- ruby_init :: IO ()
- ruby_finalize :: IO ()
- ruby_init_loadpath :: IO ()
- c_rb_str_new2 :: CString -> IO RValue
- rb_ary_new2 :: CLong -> IO RValue
- rb_ary_new4 :: CLong -> Ptr RValue -> IO RValue
- c_rb_load_protect :: RValue -> Int -> Ptr Int -> IO ()
- c_rb_funcall_0 :: RValue -> RID -> Int -> IO RValue
- c_rb_funcall_1 :: RValue -> RID -> Int -> RValue -> IO RValue
- c_rb_funcall_2 :: RValue -> RID -> Int -> RValue -> RValue -> IO RValue
- c_rb_funcall_3 :: RValue -> RID -> Int -> RValue -> RValue -> RValue -> IO RValue
- c_rb_funcall_4 :: RValue -> RID -> Int -> RValue -> RValue -> RValue -> RValue -> IO RValue
- c_rb_funcall_5 :: RValue -> RID -> Int -> RValue -> RValue -> RValue -> RValue -> RValue -> IO RValue
- c_rb_gv_get :: CString -> IO RValue
- c_rb_intern :: CString -> IO RID
- rb_id2name :: RID -> IO CString
- c_rb_string_value_ptr :: Ptr RValue -> IO CString
- rb_cObject :: Ptr RValue
- c_rb_iv_set :: RValue -> CString -> RValue -> IO RValue
- c_rb_define_class :: CString -> RValue -> IO RValue
- c_rb_define_method :: RValue -> CString -> FunPtr a -> Int -> IO ()
- c_rb_define_global_function :: CString -> FunPtr a -> Int -> IO ()
- rb_const_get :: RValue -> RID -> IO RValue
- safeCallback :: FunPtr (RValue -> IO RValue)
- c_rb_protect :: FunPtr (RValue -> IO RValue) -> RValue -> Ptr Int -> IO RValue
- c_rb_string_value_cstr :: Ptr RValue -> IO CString
- rb_ary_new :: IO RValue
- rb_ary_push :: RValue -> RValue -> IO RValue
- rb_ary_entry :: RValue -> CLong -> IO RValue
- rb_hash_foreach :: RValue -> FunPtr a -> RValue -> IO ()
- rb_big2str :: RValue -> CInt -> IO RValue
- rb_cstr_to_inum :: CString -> CInt -> CInt -> IO RValue
- newFloat :: Double -> IO RValue
- rb_hash_new :: IO RValue
- rb_hash_aset :: RValue -> RValue -> RValue -> IO RValue
- c_rb_define_module :: CString -> IO ()
- arrayLength :: RValue -> IO CLong
- rubyType :: RValue -> IO CInt
- num2dbl :: RValue -> IO Double
- int2num :: CLong -> IO RValue
- num2long :: RValue -> IO CLong
- sym2id :: RValue -> RID
- id2sym :: RID -> RValue
- rbFalse :: RValue
- rbUndef :: RValue
- rbNil :: RValue
- rbTrue :: RValue
- rtype :: RValue -> IO RType
- rb_string_value_cstr :: RValue -> IO String
- rb_define_global_function :: String -> FunPtr a -> Int -> IO ()
- rb_define_method :: RValue -> String -> FunPtr a -> Int -> IO ()
- rb_define_class :: String -> RValue -> IO RValue
- rb_str_new2 :: String -> IO RValue
- rb_define_module :: String -> IO ()
- rb_iv_set :: RValue -> String -> RValue -> IO RValue
- rb_load_protect :: String -> Int -> IO Int
- rb_funcall :: RValue -> RID -> [RValue] -> IO RValue
- rbMethodCall :: String -> String -> [RValue] -> IO RValue
- getClass :: String -> IO RValue
- rb_gv_get :: String -> IO RValue
- rb_intern :: String -> IO RID
- rb_string_value_ptr :: RValue -> IO String
Documentation
type RValue = Ptr CULongSource
This is the type of Ruby values. It is defined as a pointer to some unsigned long, just like Ruby does. The actual value is either pointed to, or encoded in the pointer.
The ruby built-in types
Ruby native types, as encoded in the Value type.
type Registered0 = IO RValueSource
type Registered1 = RValue -> IO RValueSource
mkRegistered0 :: Registered0 -> IO (FunPtr Registered0)Source
Creates a function pointer suitable for usage with rb_define_global_function
of type Registered0
(with 0 arguments).
mkRegistered1 :: Registered1 -> IO (FunPtr Registered1)Source
Creates a function pointer suitable for usage with rb_define_global_function
of type Registered1
(with 1 RValue
arguments).
mkRegistered2 :: Registered2 -> IO (FunPtr Registered2)Source
Creates a function pointer suitable for usage with rb_define_global_function
of type Registered2
(with 2 RValue
arguments).
ruby_finalize :: IO ()Source
ruby_init_loadpath :: IO ()Source
c_rb_str_new2 :: CString -> IO RValueSource
rb_ary_new2 :: CLong -> IO RValueSource
c_rb_funcall_5 :: RValue -> RID -> Int -> RValue -> RValue -> RValue -> RValue -> RValue -> IO RValueSource
c_rb_gv_get :: CString -> IO RValueSource
c_rb_intern :: CString -> IO RIDSource
rb_id2name :: RID -> IO CStringSource
c_rb_define_module :: CString -> IO ()Source
arrayLength :: RValue -> IO CLongSource
rb_define_global_functionSource
:: String | Name of the function |
-> FunPtr a | Pointer to the function (created with something like |
-> Int | Number of arguments the function accepts. |
-> IO () |
Defines a global function that can be called from the Ruby world. This function must only accept RValue
s as arguments.
rb_str_new2 :: String -> IO RValueSource
rb_define_module :: String -> IO ()Source
Sets an instance variable