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

module T6088 where

class C a

newtype A n = A Int

type family Pos n
data True

instance (Pos n ~ True) => C (A n)

newtype B n = B (A n) deriving (C)
  -- This should work, giving
  -- instance C (B n)