testsuite: Assert that testsuite ways are known
[ghc.git] / testsuite / tests / typecheck / should_compile / T11608.hs
1 {-# LANGUAGE DefaultSignatures #-}
2 {-# LANGUAGE FunctionalDependencies #-}
3 {-# LANGUAGE MultiParamTypeClasses #-}
4 {-# LANGUAGE RankNTypes #-}
5 {-# LANGUAGE TypeFamilies #-}
6
7 module T11608 where
8
9 type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t
10
11 class Each s t a b | s -> a, t -> b, s b -> t, t a -> s where
12 each :: Traversal s t a b
13 default each :: (Traversable g, s ~ g a, t ~ g b) => Traversal s t a b
14 each = traverse