mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 13:02:13 +01:00
15 lines
284 B
Haskell
15 lines
284 B
Haskell
import Control.Applicative
|
|
import qualified Data.ByteString as BS
|
|
import Data.MessagePack
|
|
|
|
main = do
|
|
sb <- newSimpleBuffer
|
|
pc <- newPacker sb
|
|
pack pc [1,2,3::Int]
|
|
pack pc True
|
|
pack pc "hoge"
|
|
bs <- simpleBufferData sb
|
|
|
|
os <- unpackObjectsFromString bs
|
|
mapM_ print os
|