diff options
author | simonpj@microsoft.com <unknown> | 2010-09-15 12:44:42 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2010-09-15 12:44:42 +0000 |
commit | a51fe79ebcdcb8285573a18f12cade2101533419 (patch) | |
tree | 483db14441d3b4f88a40743c9aa1287807026200 /compiler/hsSyn | |
parent | 0ccc12b6d176efe4a6d605864412deda75b62459 (diff) | |
download | haskell-a51fe79ebcdcb8285573a18f12cade2101533419.tar.gz |
Implement INLINABLE pragma
Implements Trac #4299. Documentation to come.
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r-- | compiler/hsSyn/Convert.lhs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs index d392be24e3..0ab26eede8 100644 --- a/compiler/hsSyn/Convert.lhs +++ b/compiler/hsSyn/Convert.lhs @@ -400,7 +400,7 @@ cvtInlineSpec Nothing = defaultInlinePragma cvtInlineSpec (Just (TH.InlineSpec inline conlike opt_activation)) = InlinePragma { inl_act = opt_activation', inl_rule = matchinfo - , inl_inline = inline, inl_sat = Nothing } + , inl_inline = inl_spec, inl_sat = Nothing } where matchinfo = cvtRuleMatchInfo conlike opt_activation' = cvtActivation opt_activation @@ -408,6 +408,10 @@ cvtInlineSpec (Just (TH.InlineSpec inline conlike opt_activation)) cvtRuleMatchInfo False = FunLike cvtRuleMatchInfo True = ConLike + inl_spec | inline = Inline + | otherwise = NoInline + -- Currently we have no way to say Inlinable + cvtActivation Nothing | inline = AlwaysActive | otherwise = NeverActive cvtActivation (Just (False, phase)) = ActiveBefore phase |