mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-14 06:55:50 +02:00
haskell binding
This commit is contained in:
16
haskell/test/Monad.hs
Normal file
16
haskell/test/Monad.hs
Normal file
@@ -0,0 +1,16 @@
|
||||
import Control.Monad.Trans
|
||||
import Data.MessagePack
|
||||
|
||||
main = do
|
||||
sb <- packToString $ do
|
||||
put [1,2,3::Int]
|
||||
put (3.14 :: Double)
|
||||
put "Hoge"
|
||||
|
||||
print sb
|
||||
|
||||
unpackFromString sb $ do
|
||||
arr <- get
|
||||
dbl <- get
|
||||
str <- get
|
||||
liftIO $ print (arr :: [Int], dbl :: Double, str :: String)
|
Reference in New Issue
Block a user