I'm not familiar with msgpack, but at a guess something like this should work.
{-# LANGUAGE TemplateHaskell #-}
import Data.MessagePack.Derive
-- I don't know which of these lines you need
-- I also don't know whether the True should actually be False
$(deriveObject True ''Document)
$(derivePack True ''Document)
$(deriveUnpack True ''Document)
(n.b. In general it's helpful to show us the code you tried that didn't work, instead of leaving us to guess that your attempts probably didn't work because you didn't enable TemplateHaskell or whatever.)