blob: 664354d840f0b4b453fed608358f268e892e1d0f (
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"
|