Re: GHC 9.6.1 rejects previously working code

2023-04-25 Thread Georgi Lyubenov
Out of curiosity, why do you require the `MonadIO` on the `Monad` instance? On 4/12/23 12:42, Harendra Kumar wrote: Thanks Tom and Rodrigo. That clarifies the problem. We will need to think which solution makes better sense. On Wed, 12 Apr 2023 at 15:01, Rodrigo Mesquita wrote:

Re: GHC 9.6.1 rejects previously working code

2023-04-12 Thread Harendra Kumar
Thanks Tom and Rodrigo. That clarifies the problem. We will need to think which solution makes better sense. On Wed, 12 Apr 2023 at 15:01, Rodrigo Mesquita wrote: > Indeed, this is included in the GHC 9.6.x Migration Guide >

Re: GHC 9.6.1 rejects previously working code

2023-04-12 Thread Rodrigo Mesquita
Indeed, this is included in the GHC 9.6.x Migration Guide . Unfortunately, I’m also not sure there is a solution for this particular where (T m) is only a Monad if m instances MonadIO. As

Re: GHC 9.6.1 rejects previously working code

2023-04-12 Thread Tom Ellis
On Wed, Apr 12, 2023 at 02:32:43PM +0530, Harendra Kumar wrote: > instance MonadIO m => Monad (T m) where > return = pure > (>>=) = undefined > > instance MonadTrans T where > lift = undefined I guess it's nothing to do with 9.6 per se, but rather the difference between *

GHC 9.6.1 rejects previously working code

2023-04-12 Thread Harendra Kumar
The following code compiles with older compilers but does not compile with GHC 9.6.1: {-# LANGUAGE KindSignatures #-} module A () where import Control.Monad.IO.Class import Control.Monad.Trans.Class data T (m :: * -> *) a = T instance Functor (T m) where fmap f T = undefined instance