ruby-marshal-0.1.2: 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.Types

Contents

Description

Common types for Ruby Marshal deserialisation.

Synopsis

Marshal Monad

data Marshal a Source

Marshal monad endows the underlying Get monad with State.

Internal cache

data Cache Source

State that we must carry around during deserialisation.

Instances

Show Cache 
MonadState Cache Marshal 

Ruby string encodings

Ruby object

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 !(Vector (RubyObject, RubyObject))

represents an Hash

RIVar !(RubyObject, RubyStringEncoding)

represents an IVar

RString !ByteString

represents a String

RFloat !Float

represents a Float

RSymbol !ByteString

represents a Symbol

Unsupported

represents an invalid object

Patterns

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

Character that represents NilCharlass.

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

Character that represents FalseClass.

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

Character that represents TrueClass.

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

Character that represents Array.

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

Character that represents Fixnum.

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

Character that represents Float.

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

Character that represents Hash.

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

Character that represents IVar.

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

Character that represents Object link.

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

Character that represents String.

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

Character that represents Symbol.

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

Character that represents Symlink.