ruby-marshal-0.1.0: Parse a subset of Ruby objects serialised with Marshal.dump.

Copyright(c) Philip Cunningham, 2015
LicenseMIT
Maintainerhello@filib.io
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.Ruby.Marshal

Contents

Description

Simple interface to deserialise Ruby Marshal binary.

Synopsis

Decoding

decode Source

Arguments

:: ByteString

Serialised Ruby object

-> Maybe RubyObject

De-serialisation result

Deserialises a subset of Ruby objects serialised with Marshal, Ruby's built-in binary serialisation format.

decodeEither Source

Arguments

:: ByteString

Serialised Ruby object

-> Either String RubyObject

Error message or de-serialisation result

Deserialises 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