blob: e8d006bab74ef8b9cee8de6c83e1f53a4914354b (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
{-# LANGUAGE DatatypeContexts, ExistentialQuantification #-}
-- Tests the "stupid theta" in pattern-matching
-- when there's an existential as well
module ShouldCompile where
data (Show a) => Obs a = forall b. LiftObs a b
f :: Obs a -> String -- Needs a (Show a) context
f (LiftObs _ _) = "yes"
|