
On 2016-06-21 at 21:12, Christopher Howard
This doesn't seem to work for me, but I'm using 7.6.3 from Debian Jessie. I'm curious what the difference is. What extensions and modules do you import? I get error
That's very interesting. Here's my full code. I needed to add the `Control.Applicative` import for GHC-7.6. In GHC-7.10, Applicative is in Prelude. {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Test where import Control.Applicative import Control.Monad.Random import Control.Monad.Reader import Control.Monad.State.Lazy newtype ReaderStateRandom r s g a = RSR { rSR :: ReaderT r (StateT s (Rand g)) a } deriving (Functor, Applicative, Monad, MonadReader r, MonadState s, MonadRandom)