blob: 86f01f37bd69b1ab35bd85d86c3d900a14d76578 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE TemplateHaskell, KindSignatures, FlexibleInstances #-}
module T5452 where
import Language.Haskell.TH hiding (Type)
import Data.Kind (Type)
class C (f :: Type -> Type)
class D (f :: Type -> Type)
instance C ((,) Int)
$(do { ClassI _ [inst_dec] <- reify ''C
; let InstanceD o tvs cxt (AppT _ ty) _ = inst_dec
; return [InstanceD o tvs cxt
(foldl AppT (ConT ''D) [ty])
[]
] })
|