Copyright | (c) Philip Cunningham 2015 |
---|---|
License | MIT |
Maintainer | hello@filib.io |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Common types for Ruby Marshal deserialisation.
Synopsis
- data Marshal a
- data Cache
- data RubyStringEncoding
- = ASCII_8BIT
- | Big5
- | Big5_HKSCS
- | Big5_UAO
- | CP50220
- | CP50221
- | CP51932
- | CP850
- | CP852
- | CP855
- | CP949
- | CP950
- | CP951
- | EUC_JP
- | EUC_JP_2004
- | EUC_KR
- | EUC_TW
- | Emacs_Mule
- | EucJP_ms
- | GB12345
- | GB18030
- | GB1988
- | GB2312
- | GBK
- | IBM437
- | IBM737
- | IBM775
- | IBM852
- | IBM855
- | IBM857
- | IBM860
- | IBM861
- | IBM862
- | IBM863
- | IBM864
- | IBM865
- | IBM866
- | IBM869
- | ISO_2022_JP
- | ISO_2022_JP_2
- | ISO_2022_JP_KDDI
- | ISO_8859_1
- | ISO_8859_10
- | ISO_8859_11
- | ISO_8859_13
- | ISO_8859_14
- | ISO_8859_15
- | ISO_8859_16
- | ISO_8859_2
- | ISO_8859_3
- | ISO_8859_4
- | ISO_8859_5
- | ISO_8859_6
- | ISO_8859_7
- | ISO_8859_8
- | ISO_8859_9
- | KOI8_R
- | KOI8_U
- | MacCentEuro
- | MacCroatian
- | MacCyrillic
- | MacGreek
- | MacIceland
- | MacJapanese
- | MacRoman
- | MacRomania
- | MacThai
- | MacTurkish
- | MacUkraine
- | SJIS_DoCoMo
- | SJIS_KDDI
- | SJIS_SoftBank
- | Shift_JIS
- | Stateless_ISO_2022_JP
- | Stateless_ISO_2022_JP_KDDI
- | TIS_620
- | US_ASCII
- | UTF8_DoCoMo
- | UTF8_KDDI
- | UTF8_MAC
- | UTF8_SoftBank
- | UTF_16
- | UTF_16BE
- | UTF_16LE
- | UTF_32
- | UTF_32BE
- | UTF_32LE
- | UTF_7
- | UTF_8
- | Windows_1250
- | Windows_1251
- | Windows_1252
- | Windows_1253
- | Windows_1254
- | Windows_1255
- | Windows_1256
- | Windows_1257
- | Windows_1258
- | Windows_31J
- | Windows_874
- | UnsupportedEncoding
- data RubyObject
- = RNil
- | RBool !Bool
- | RFixnum !Int
- | RArray !(Vector RubyObject)
- | RHash !(Vector (RubyObject, RubyObject))
- | RIVar !(RubyObject, RubyStringEncoding)
- | RString !ByteString
- | RFloat !Float
- | RSymbol !ByteString
- | Unsupported
- pattern NilChar :: forall a. (Eq a, Num a) => a
- pattern FalseChar :: forall a. (Eq a, Num a) => a
- pattern TrueChar :: forall a. (Eq a, Num a) => a
- pattern ArrayChar :: forall a. (Eq a, Num a) => a
- pattern FixnumChar :: forall a. (Eq a, Num a) => a
- pattern FloatChar :: forall a. (Eq a, Num a) => a
- pattern HashChar :: forall a. (Eq a, Num a) => a
- pattern IVarChar :: forall a. (Eq a, Num a) => a
- pattern ObjectLinkChar :: forall a. (Eq a, Num a) => a
- pattern StringChar :: forall a. (Eq a, Num a) => a
- pattern SymbolChar :: forall a. (Eq a, Num a) => a
- pattern SymlinkChar :: forall a. (Eq a, Num a) => a
Marshal Monad
Marshal monad endows the underlying Get monad with State.
Internal cache
State that we must carry around during deserialisation.
Ruby string encodings
data RubyStringEncoding Source #
ADT representing all supported Ruby encodings.
Instances
Ruby object
data RubyObject Source #
Representation of a Ruby object.
RNil | represents |
RBool !Bool | represents |
RFixnum !Int | represents a |
RArray !(Vector RubyObject) | represents an |
RHash !(Vector (RubyObject, RubyObject)) | represents an |
RIVar !(RubyObject, RubyStringEncoding) | represents an |
RString !ByteString | represents a |
RFloat !Float | represents a |
RSymbol !ByteString | represents a |
Unsupported | represents an invalid object |
Instances
Eq RubyObject Source # | |
Defined in Data.Ruby.Marshal.RubyObject (==) :: RubyObject -> RubyObject -> Bool # (/=) :: RubyObject -> RubyObject -> Bool # | |
Ord RubyObject Source # | |
Defined in Data.Ruby.Marshal.RubyObject compare :: RubyObject -> RubyObject -> Ordering # (<) :: RubyObject -> RubyObject -> Bool # (<=) :: RubyObject -> RubyObject -> Bool # (>) :: RubyObject -> RubyObject -> Bool # (>=) :: RubyObject -> RubyObject -> Bool # max :: RubyObject -> RubyObject -> RubyObject # min :: RubyObject -> RubyObject -> RubyObject # | |
Show RubyObject Source # | |
Defined in Data.Ruby.Marshal.RubyObject showsPrec :: Int -> RubyObject -> ShowS # show :: RubyObject -> String # showList :: [RubyObject] -> ShowS # | |
Rubyable RubyObject Source # | |
Defined in Data.Ruby.Marshal.RubyObject toRuby :: RubyObject -> RubyObject Source # fromRuby :: RubyObject -> Maybe RubyObject Source # |
Patterns
pattern FixnumChar :: forall a. (Eq a, Num a) => a Source #
Character that represents Fixnum.
pattern ObjectLinkChar :: forall a. (Eq a, Num a) => a Source #
Character that represents Object link.
pattern StringChar :: forall a. (Eq a, Num a) => a Source #
Character that represents String.
pattern SymbolChar :: forall a. (Eq a, Num a) => a Source #
Character that represents Symbol.
pattern SymlinkChar :: forall a. (Eq a, Num a) => a Source #
Character that represents Symlink.