{-# LANGUAGE CPP #-}
module LLVM.TH (
module Language.Haskell.TH,
conT, appT
) where
#if __GLASGOW_HASKELL__ < 710
import LLVM.Prelude
#endif
import qualified Language.Haskell.TH as TH (conT, appT)
import Language.Haskell.TH hiding (conT, appT)
class Typish qt where
appT :: qt -> Q Type -> qt
conT :: Name -> qt
instance Typish (Q Type) where
appT = TH.appT
conT = TH.conT
#if __GLASGOW_HASKELL__ < 710
instance Typish (Q Pred) where
appT qp qt = do
ClassP n ts <- qp
t <- qt
return $ ClassP n (ts ++ [t])
conT n = classP n []
#endif