packages feed

ghc-exactprint-0.5.0.0: tests/examples/ghc8/T10306.hs

{-# 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
 )