A bit more performance tuning.
A bit more performance tuning.

This makes sure that the instances of `Message` don't have to be
polymorphic over an arbitrary `(>>=)` implementation.

In the case of `ConstMsg`, there doesn't really need to be a monad there
at all, so all of the functions are now of the form pure $ ... (only one
needed changing), allowing GHC to optimize away internal uses of
`(>>=)`.

For `MutMsg` the story is similar, but with `ST` instead of no Monad at
all. We now use `stToPrim` to achieve the same thing.

I'm noticing a 20% speedup or so for some ocap-merkledag things.

zenhack/haskell-capnp