Don't skip validity checks for built-in classes (#17355)
[ghc.git] / testsuite / tests / typecheck / should_compile / tc115.hs
1 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
2 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
3 FlexibleInstances #-}
4 -- !!! Functional dependencies
5 -- This broke an early impl of functional dependencies
6 -- (complaining about ambiguity)
7
8 module ShouldCompile where
9
10 class Foo r a | r -> a where
11 foo :: r -> a
12
13 instance Foo [m a] (m a)
14
15 bad:: Monad m => m a
16 bad = foo bar
17
18 bar:: Monad m => [m a]
19 bar = []