testsuite: Assert that testsuite ways are known
[ghc.git] / testsuite / tests / typecheck / should_compile / T2494.hs
1 {-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
2
3 -- #2494, should generate an error message
4
5 module Foo where
6
7 foo :: (forall m. Monad m => Maybe (m a) -> Maybe (m a)) -> Maybe a -> Maybe a
8 foo _ x = x
9
10 {-# RULES
11
12 "foo/foo"
13 forall (f :: forall m. Monad m => Maybe (m a) -> Maybe (m a))
14 (g :: forall m. Monad m => Maybe (m b) -> Maybe (m b)) x.
15 foo f (foo g x) = foo (f . g) x
16 #-}