New GeneralizedNewtypeDeriving check still isn't permissive enough
|Reported by:||goldfire||Owned by:||goldfire|
|Keywords:||Cc:||dimitris@…, sweirich@…, diatchki|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||#8541||Differential Revisions:|
Roman Cheplyaka writes:
I just tried compiling smallcheck with GHC HEAD, and it didn't work out:
Test/SmallCheck/SeriesMonad.hs:41:7: Can't make a derived instance of ‛MonadLogic (Series m)’ (even with cunning newtype deriving): it is not type-safe to use GeneralizedNewtypeDeriving on this class; ‛msplit’, at type ‛forall a. m a -> m (Maybe (a, m a))’, cannot be converted safely In the newtype declaration for ‛Series’
So GHC now looks at the methods, but the problem is still there.
I would agree that msplit's type is problematic (due to the nested m's), but Simon and Richard previously said that it should work, so I'm confused.