T7910.hs 322 Bytes
Newer Older
Simon Peyton Jones's avatar
Simon Peyton Jones committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where

import Language.Haskell.TH
import Language.Haskell.TH.Syntax

class C a
instance C Int

type D a = C a

main = print $(
  do isCInst <- isInstance ''C [ConT ''Int]
     isDInst <- isInstance ''D [ConT ''Int]
     lift (isCInst,isDInst))