I am new to Haskell, so perhaps I am mistaken in expecting the following to work, but it seems to me that MessagePack should be able to serialize any ADT.
{-# LANGUAGE TemplateHaskell #-}
import Data.MessagePack
data Test = X | Y | Z Int deriving Show
deriveObject True ''Test
main = do
print ((unpack . pack) X :: Test) -- "X" as expected
print ((unpack . pack) Y :: Test) -- "X", but expected "Y"
print ((unpack . pack) $ Z 3 :: Test) -- "Z 3" as expected
print $ pack X
print $ pack Y
print $ pack $ Z 3
I am new to Haskell, so perhaps I am mistaken in expecting the following to work, but it seems to me that MessagePack should be able to serialize any ADT.