Lift instance of class with a `MonadIO` type-variable to the transformed monad
问题 As part of a program where I need to log data from monadic computations, I am trying to define a class to make this more convenient. module Serial where import Data.Int import Data.IORef import System.IO import Control.Monad.Trans import Foreign.Ptr import Foreign.Marshal import Foreign.Storable class MonadIO m => Serial m a where get :: Handle -> m a put :: Handle -> a -> m () One of the things I'd like to be able to do is to define get and put in a 'higher' monad, since some data is