Fix for GHC 7.8: use standalone deriving for Typeable instance
Fix deprecation warning: add Applicative instance to Monad