Skip to content

Commit 62e2902

Browse files
committed
Include nolinline pragma in pPrint of Cforeign
1 parent 507d588 commit 62e2902

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/comp/CSyntax.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,8 @@ instance PPrint CDefn where
965965
(IdK i) -> ppConId d i
966966
(IdKind i k) -> ppConId d i <+> t "::" <+> pp d k
967967
(IdPKind i pk) -> ppConId d i <+> t "::" <+> pp d pk
968-
pPrint d p (Cforeign i ty oname opnames _) =
968+
pPrint d p (Cforeign i ty oname opnames ni) =
969+
(if ni then text "{-# noinline" <+> ppVarId d i <+> text "#-}" else text "") <+>
969970
text "foreign" <+> ppVarId d i <+> t "::" <+> pp d ty <>
970971
(case oname of Nothing -> text ""; Just s -> text (" = " ++ show s)) <>
971972
(case opnames of Nothing -> text ""; Just (is, os) -> t"," <> pparen True (sep (map (text . show) is ++ po os)))

0 commit comments

Comments
 (0)