X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FConvert.lhs;h=cc54b843cea4ba6bd57c155e86822d5f7a799ff7;hb=8fa8c98ee75649c2548d2bd9cb730a93cf80fe5c;hp=0ab26eede8cbde28c6aa167067127981f961cdc2;hpb=a51fe79ebcdcb8285573a18f12cade2101533419;p=ghc-hetmet.git diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs index 0ab26ee..cc54b84 100644 --- a/compiler/hsSyn/Convert.lhs +++ b/compiler/hsSyn/Convert.lhs @@ -7,7 +7,8 @@ This module converts Template Haskell syntax into HsSyn \begin{code} module Convert( convertToHsExpr, convertToPat, convertToHsDecls, - convertToHsType, thRdrNameGuesses ) where + convertToHsType, convertToHsPred, + thRdrNameGuesses ) where import HsSyn as Hs import qualified Class @@ -58,6 +59,10 @@ convertToHsType :: SrcSpan -> TH.Type -> Either Message (LHsType RdrName) convertToHsType loc t = initCvt loc $ wrapMsg "type" t $ cvtType t +convertToHsPred :: SrcSpan -> TH.Pred -> Either Message (LHsPred RdrName) +convertToHsPred loc t + = initCvt loc $ wrapMsg "type" t $ cvtPred t + ------------------------------------------------------------------- newtype CvtM a = CvtM { unCvtM :: SrcSpan -> Either Message a } -- Push down the source location;