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

module T10306 where

import Language.Haskell.TH
import GHC.TypeLits

-- Attempting to reify a built-in type family like (+) previously
-- caused a crash, because it has no equations
$(do x <- reify ''(+)
     case x of
       FamilyI (ClosedTypeFamilyD _ []) _ -> return []
       _ -> error $ show x
 )