Ticket #2494 (closed bug: fixed)
Panic in tcSimplifyRuleLhs
Description
With this module, both 6.8.3 and the HEAD panic in tcSimplifyRuleLhs:
{-# LANGUAGE Rank2Types, ScopedTypeVariables #-}
module Foo where
foo :: (forall m. Monad m => Maybe (m a) -> Maybe (m a)) -> Maybe a -> Maybe a
foo _ x = x
{-# RULES
"foo/foo"
forall (f :: forall m. Monad m => Maybe (m a) -> Maybe (m a))
(g :: forall m. Monad m => Maybe (m b) -> Maybe (m b)) x.
foo f (foo g x) = foo (f . g) x
#-}
Note that the rule is incorrectly typed; with the correct types, no panic happens.
Incidentially, I'm not sure if ScopedTypeVariables should be required here.
Change History
Note: See
TracTickets for help on using
tickets.
