Re: [Haskell-cafe] Failure deriving MonadRWS when using a type-family for the State part

2013-05-20 Thread Nicolas Trangez
The mistake might be on my side, since I expected the following to work (but it doesn't, most likely for good reason, I didn't read any TypeFamilies papers yet): {-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies #-} module Main where import Control.Monad.State data S = S T data T = T type

[Haskell-cafe] Failure deriving MonadRWS when using a type-family for the State part

2013-05-20 Thread Nicolas Trangez
All, The following code results in a compilation error (I tried GHC 7.4.1 & a 7.7.20130430 build): {-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, StandaloneDeriving #-} module Main where import Control.Applicative import Control.Monad.RWS data C = C data E = E