summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/data1.hs
blob: 7b999c4e801d7e6d972c0717827209e60c825735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE GADTs #-}

-- #289

module ShouldCompile where

class C a where
  f :: a -> Bool

data T a where
  MkT :: (C a) => a -> T a

tf1 :: T Int -> Bool
tf1 (MkT aa) = f aa

tf2 :: T a -> Bool
tf2 (MkT aa) = f aa