#1537: do notation translation
--------------------------------------+-------------------------------------
Reporter: Isaac Dupree | Owner: simonpj
Type: bug | Status: closed
Priority: normal | Milestone: 6.10 branch
Component: Compiler (Type checker) | Version: 6.7
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Testcase: rebindable8, rebindable9 | Architecture: Unknown
Os: Unknown |
--------------------------------------+-------------------------------------
Changes (by mnislaih):
* testcase: rebindable8 => rebindable8, rebindable9
Comment:
Stolen from the parameterized monads framework, in test rebindable8 we
have
{{{
class Bind m1 m2 m3 where
(>>=) :: m1 a -> (a -> m2 b) -> m3 b
class Return m where
return :: a -> m a
fail :: String -> m a
}}}
And the simple instance
{{{
instance Bind Maybe [] [] where ...
instance Return [] where ...
}}}
Now consider the following instances
{{{
instance Bind Identity m m where ...
instance Bind m Identity m where ...
}}}
The second one does not play well with ghc HEAD currently, since (>>=)
gets the type
{{{
(>>=) :: (...)=> m a -> (a -> Identity b) -> m b
}}}
I have pushed a test 'rebindable9' that shows the issue in detail.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1537#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs