Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Cache = Cache {
- _objects :: Vector RubyObject
- _symbols :: Vector RubyObject
- data Error = Unsupported
- newtype Marshal a = Marshal {
- runMarshal :: StateT Cache Get a
- liftMarshal :: Get a -> Marshal a
- data RubyObject
- = RNil
- | RBool !Bool
- | RFixnum !Int
- | RArray !(Vector RubyObject)
- | RHash !(Map RubyObject RubyObject)
- | RIVar !(RubyObject, ByteString)
- | RString !ByteString
- | RFloat !Double
- | RSymbol !ByteString
- | RError !Error
- pattern NilC :: (Num a, Eq a) => a
- pattern FalseC :: (Num a, Eq a) => a
- pattern TrueC :: (Num a, Eq a) => a
- pattern ArrayC :: (Num a, Eq a) => a
- pattern FixnumC :: (Num a, Eq a) => a
- pattern FloatC :: (Num a, Eq a) => a
- pattern HashC :: (Num a, Eq a) => a
- pattern IVarC :: (Num a, Eq a) => a
- pattern ObjectLinkC :: (Num a, Eq a) => a
- pattern StringC :: (Num a, Eq a) => a
- pattern SymbolC :: (Num a, Eq a) => a
- pattern SymlinkC :: (Num a, Eq a) => a
Documentation
Cache | |
|
Convey when unsupported object encountered.
Unsupported | represents an unsupported Ruby object |
Marshal monad endows the underling Get monad with State.
Marshal | |
|
liftMarshal :: Get a -> Marshal a Source
Lift Get monad into Marshal monad.
data RubyObject Source
Representation of a Ruby object.
RNil | represents |
RBool !Bool | represents |
RFixnum !Int | represents a |
RArray !(Vector RubyObject) | represents an |
RHash !(Map RubyObject RubyObject) | represents an |
RIVar !(RubyObject, ByteString) | represents an |
RString !ByteString | represents a |
RFloat !Double | represents a |
RSymbol !ByteString | represents a |
RError !Error | represents an invalid object |
pattern ObjectLinkC :: (Num a, Eq a) => a Source
Object link