summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc182.hs
blob: f6e9164f47ecaf248bae667495e380d5df887332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# 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 :: Show a => Obs a -> String
f (LiftObs _ _) = "yes"