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.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.

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

Character that represents NilCharlass.

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

Character that represents FalseClass.

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

Character that represents TrueClass.

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

Character that represents Array.

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

Character that represents Fixnum.

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

Character that represents Float.

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

Character that represents Hash.

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

Character that represents IVar.

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

Character that represents Object link.

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

Character that represents String.

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

Character that represents Symbol.

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

Character that represents Symlink.