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.
- 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 :: (Num a, Eq a) => a
- pattern FalseChar :: (Num a, Eq a) => a
- pattern TrueChar :: (Num a, Eq a) => a
- pattern ArrayChar :: (Num a, Eq a) => a
- pattern FixnumChar :: (Num a, Eq a) => a
- pattern FloatChar :: (Num a, Eq a) => a
- pattern HashChar :: (Num a, Eq a) => a
- pattern IVarChar :: (Num a, Eq a) => a
- pattern ObjectLinkChar :: (Num a, Eq a) => a
- pattern StringChar :: (Num a, Eq a) => a
- pattern SymbolChar :: (Num a, Eq a) => a
- pattern SymlinkChar :: (Num a, Eq 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.
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 |
Patterns
pattern FixnumChar :: (Num a, Eq a) => a Source
Character that represents Fixnum.
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.