Injective type families
[ghc.git] / testsuite / tests / th / T10306.hs
1 {-# LANGUAGE TemplateHaskell, TypeFamilies #-}
2
3 module T10306 where
4
5 import Language.Haskell.TH
6 import GHC.TypeLits
7
8 -- Attempting to reify a built-in type family like (+) previously
9 -- caused a crash, because it has no equations
10 $(do x <- reify ''(+)
11 case x of
12 FamilyI (ClosedTypeFamilyD _ _ _ _ []) _ -> return []
13 _ -> error $ show x
14 )