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

Safe HaskellNone
LanguageHaskell2010

Data.Ruby.Marshal.Types

Synopsis

Documentation

data Cache Source

Constructors

Cache 

Fields

_objects :: Vector RubyObject

object cache.

_symbols :: Vector RubyObject

symbol cache.

Instances

Show Cache 
MonadState Cache Marshal 

data Error Source

Convey when unsupported object encountered.

Constructors

Unsupported

represents an unsupported Ruby object

Instances

newtype Marshal a Source

Marshal monad endows the underling Get monad with State.

Constructors

Marshal 

Fields

runMarshal :: StateT Cache Get a
 

liftMarshal :: Get a -> Marshal a Source

Lift Get monad into Marshal monad.

data RubyObject Source

Representation of a Ruby object.

Constructors

RNil

represents nil

RBool !Bool

represents true or false

RFixnum !Int

represents a Fixnum

RArray !(Vector RubyObject)

represents an Array

RHash !(Map RubyObject RubyObject)

represents an Hash

RIVar !(RubyObject, ByteString)

represents an IVar

RString !ByteString

represents a String

RFloat !Double

represents a Float

RSymbol !ByteString

represents a Symbol

RError !Error

represents an invalid object

pattern NilC :: (Num a, Eq a) => a Source

NilClass

pattern FalseC :: (Num a, Eq a) => a Source

FalseClass

pattern TrueC :: (Num a, Eq a) => a Source

TrueClass

pattern ArrayC :: (Num a, Eq a) => a Source

Array

pattern FixnumC :: (Num a, Eq a) => a Source

Fixnum

pattern FloatC :: (Num a, Eq a) => a Source

Float

pattern HashC :: (Num a, Eq a) => a Source

Hash

pattern IVarC :: (Num a, Eq a) => a Source

IVar

pattern ObjectLinkC :: (Num a, Eq a) => a Source

Object link

pattern StringC :: (Num a, Eq a) => a Source

String

pattern SymbolC :: (Num a, Eq a) => a Source

Symbol

pattern SymlinkC :: (Num a, Eq a) => a Source

Symlink