| Copyright | (c) Philip Cunningham 2015 |
|---|---|
| License | MIT |
| Maintainer | hello@filib.io |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Ruby.Marshal
Description
Simple interface to parse Ruby Marshal binary.
Synopsis
- decode :: ByteString -> Maybe RubyObject
- decodeEither :: ByteString -> Either String RubyObject
- fromRuby :: Rubyable a => RubyObject -> Maybe a
- toRuby :: Rubyable a => a -> RubyObject
- module Data.Ruby.Marshal.Types
Decoding
Arguments
| :: ByteString | Serialised Ruby object |
| -> Maybe RubyObject | De-serialisation result |
Parses a subset of Ruby objects serialised with Marshal, Ruby's built-in binary serialisation format.
Arguments
| :: ByteString | Serialised Ruby object |
| -> Either String RubyObject | Error message or de-serialisation result |
Parses a subset of Ruby objects serialised with Marshal, Ruby's built-in binary serialisation format.
Lifting into and lowering from RubyObject
fromRuby :: Rubyable a => RubyObject -> Maybe a Source #
Takes a RubyObject transforms it into a more general Haskell value.
toRuby :: Rubyable a => a -> RubyObject Source #
Takes a plain Haskell value and lifts into RubyObject
Re-exported modules
module Data.Ruby.Marshal.Types