packages feed

hruby 0.1.0 → 0.1.1

raw patch · 3 files changed

+11/−1 lines, 3 files

Files

Foreign/Ruby.hs view
@@ -41,6 +41,8 @@     , safeMethodCall     -- * Error handling     , showErrorStack+    -- * Various+    , rb_iv_set     ) where 
Foreign/Ruby/Bindings.hsc view
@@ -108,6 +108,7 @@ #else foreign import ccall "&ruby_errinfo"             ruby_errinfo                :: Ptr RValue #endif+foreign import ccall "rb_iv_set"                 c_rb_iv_set                 :: RValue -> CString -> RValue -> IO RValue foreign import ccall "rb_define_class"           c_rb_define_class           :: CString -> RValue -> IO RValue foreign import ccall "rb_define_method"          c_rb_define_method          :: RValue -> CString -> FunPtr a -> Int -> IO () foreign import ccall "rb_define_global_function" c_rb_define_global_function :: CString -> FunPtr a -> Int -> IO ()@@ -235,6 +236,13 @@  rb_define_module :: String -> IO () rb_define_module str = withCString str c_rb_define_module++-- | Sets an instance variable+rb_iv_set :: RValue -- ^ The object+          -> String -- ^ The variable name (without the @)+          -> RValue -- ^ The value to set+          -> IO RValue -- ^ The value you just set+rb_iv_set obj varname varvalue = withCString ('@' : varname) $ \cvarname -> c_rb_iv_set obj cvarname varvalue  -- | Loads a ruby script (and executes it). rb_load_protect :: String -- ^ Path to the script
hruby.cabal view
@@ -2,7 +2,7 @@ --  see http://haskell.org/cabal/users-guide/  name:                hruby-version:             0.1.0+version:             0.1.1 synopsis:            Embed Ruby in your Haskell program. description:         Warning: this is completely experimental. Everything you need should be in "Foreign.Ruby". license:             BSD3