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

module T3826 where

class C a where
  type E a
  c :: E a -> a -> a

data T a = T a

instance C (T a) where
  type E (T a) = a
  c x (T _) = T x

f t@(T x) = c x t