X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FhsSyn%2FConvert.lhs;h=d14d04ac954aaab03ae6e0e699d4c9f97621592f;hb=836b1e90821aacc9d1e09fe78085f911597274c8;hp=56ec2d763d44a46bbcc29904c82106633b5d9fb1;hpb=fb02349ca1daf3eaedeff076bf7cedb5923b82f7;p=ghc-hetmet.git diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs index 56ec2d7..d14d04a 100644 --- a/compiler/hsSyn/Convert.lhs +++ b/compiler/hsSyn/Convert.lhs @@ -19,6 +19,7 @@ import qualified OccName import OccName import SrcLoc import Type +import Coercion import TysWiredIn import BasicTypes as Hs import ForeignCall @@ -394,20 +395,23 @@ cvtPragmaD (SpecialiseP nm ty opt_ispec) ; ty' <- cvtType ty ; return $ SpecSig nm' ty' (cvtInlineSpec opt_ispec) } -cvtInlineSpec :: Maybe TH.InlineSpec -> Hs.InlineSpec +cvtInlineSpec :: Maybe TH.InlineSpec -> Hs.InlinePragma cvtInlineSpec Nothing - = defaultInlineSpec + = defaultInlinePragma cvtInlineSpec (Just (TH.InlineSpec inline conlike opt_activation)) - = mkInlineSpec opt_activation' matchinfo inline + = InlinePragma { inl_act = opt_activation', inl_rule = matchinfo + , inl_inline = inline, inl_sat = Nothing } where matchinfo = cvtRuleMatchInfo conlike - opt_activation' = fmap cvtActivation opt_activation + opt_activation' = cvtActivation opt_activation cvtRuleMatchInfo False = FunLike cvtRuleMatchInfo True = ConLike - cvtActivation (False, phase) = ActiveBefore phase - cvtActivation (True , phase) = ActiveAfter phase + cvtActivation Nothing | inline = AlwaysActive + | otherwise = NeverActive + cvtActivation (Just (False, phase)) = ActiveBefore phase + cvtActivation (Just (True , phase)) = ActiveAfter phase --------------------------------------------------- -- Declarations @@ -637,7 +641,7 @@ cvtTvs tvs = mapM cvt_tv tvs cvt_tv :: TH.TyVarBndr -> CvtM (LHsTyVarBndr RdrName) cvt_tv (TH.PlainTV nm) = do { nm' <- tName nm - ; returnL $ UserTyVar nm' + ; returnL $ UserTyVar nm' placeHolderKind } cvt_tv (TH.KindedTV nm ki) = do { nm' <- tName nm