X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FRdrHsSyn.lhs;h=382b333e2b75f9cf1e7114f11aa4329ef47c12f8;hp=bccf27f4228ab0c135cccf3b44c4a1e12a19ece8;hb=4bc25e8c30559b7a6a87b39afcc79340ae778788;hpb=bd78c94a3b41f8d2097efc0415fa26e0cd1140ef diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs index bccf27f..382b333 100644 --- a/compiler/parser/RdrHsSyn.lhs +++ b/compiler/parser/RdrHsSyn.lhs @@ -58,7 +58,9 @@ import TypeRep ( Kind ) import RdrName ( RdrName, isRdrTyVar, isRdrTc, mkUnqual, rdrNameOcc, isRdrDataCon, isUnqual, getRdrName, isQual, setRdrNameSpace, showRdrName ) -import BasicTypes ( maxPrecedence, Activation, InlineSpec(..), alwaysInlineSpec, neverInlineSpec ) +import BasicTypes ( maxPrecedence, Activation, RuleMatchInfo, + InlinePragma(..), InlineSpec(..), + alwaysInlineSpec, neverInlineSpec ) import Lexer ( P, failSpanMsgP, extension, standaloneDerivingEnabled, bangPatEnabled ) import TysWiredIn ( unitTyCon ) import ForeignCall ( CCallConv, Safety, CCallTarget(..), CExportSpec(..), @@ -923,11 +925,13 @@ mk_rec_fields :: [HsRecField id arg] -> Bool -> HsRecFields id arg mk_rec_fields fs False = HsRecFields { rec_flds = fs, rec_dotdot = Nothing } mk_rec_fields fs True = HsRecFields { rec_flds = fs, rec_dotdot = Just (length fs) } -mkInlineSpec :: Maybe Activation -> Bool -> InlineSpec +mkInlineSpec :: Maybe Activation -> RuleMatchInfo -> Bool -> InlineSpec -- The Maybe is becuase the user can omit the activation spec (and usually does) -mkInlineSpec Nothing True = alwaysInlineSpec -- INLINE -mkInlineSpec Nothing False = neverInlineSpec -- NOINLINE -mkInlineSpec (Just act) inl = Inline act inl +mkInlineSpec Nothing match_info True = alwaysInlineSpec match_info + -- INLINE +mkInlineSpec Nothing match_info False = neverInlineSpec match_info + -- NOINLINE +mkInlineSpec (Just act) match_info inl = Inline (InlinePragma act match_info) inl -----------------------------------------------------------------------------