blob: 54d76f52267c1d8803df779b6e1bfa4e935bda75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{-# LANGUAGE PolyKinds, DataKinds, TemplateHaskell, TypeFamilies #-}
module TH_TyInstWhere3 where
import Language.Haskell.TH
type family F a
$( do { decs <- [d| type instance where
F Int = Int |]
; reportWarning (pprint decs)
; return decs })
type instance F a = a
-- When this test was written, TH considered all singleton type family instance
-- as unbranched. Thus, even though the two instances above would not play nicely
-- without TH, they should be fine with TH.
|