Merge commit '7b0b9f603bb1215e2b7af23c2404d637b95a4988' as 'hadrian'
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail125.hs
1 {-# LANGUAGE DatatypeContexts, ExistentialQuantification #-}
2
3 -- Tests the "stupid theta" in pattern-matching
4 -- when there's an existential as well
5
6 module ShouldCompile where
7
8 data (Show a) => Obs a = forall b. LiftObs a b
9
10 f :: Obs a -> String -- Needs a (Show a) context
11 f (LiftObs _ _) = "yes"