[GHC] #8503: New GeneralizedNewtypeDeriving check still isn't permissive enough
GHC
ghc-devs at haskell.org
Mon Nov 4 16:07:56 UTC 2013
#8503: New GeneralizedNewtypeDeriving check still isn't permissive enough
------------------------------------+-------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8503>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list