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.

data Error Source

Convey when unsupported object encountered.

Constructors

Unsupported

represents an unsupported Ruby object

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 :: () => (Eq a, Num a) => a Source

NilClass

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

FalseClass

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

TrueClass

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

Array

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

Fixnum

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

Float

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

Hash

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

IVar

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

Object link

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

String

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

Symbol

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

Symlink