summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/TH_TyInstWhere1.hs
blob: d8c07d76429dd1e1686d8c5734e4083e1bb3fccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE PolyKinds, DataKinds, TemplateHaskell, TypeFamilies #-}

module TH_TyInstWhere1 where

$([d| type family F (a :: k) (b :: k) :: Bool where
        F a a = True
        F a b = False |])

data Proxy a = P

f :: Proxy True -> Proxy (F Int Int)
f x = x

g :: Proxy False -> Proxy (F Int Bool)
g x = x