summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/Class2.hs
blob: f0d90f35f57fe14cdf9413b914faa3fef50a9f07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE TypeFamilies #-}

module Class2 where

data family T a
data instance T Int = TInt Int

data U = U (T Int)

instance Show a => Show (T a) where
  showsPrec k t = showString "T"

instance Show U where
  showsPrec k (U x) = showsPrec k x