From 5b9fe33d8a85c2e2105844b65da417c7358187ab Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Wed, 15 Oct 2014 22:51:59 -0700 Subject: Indentation and non-semantic changes only. Summary: Get these lines fitting in 80 columns, and replace ptext (sLit ...) with text Signed-off-by: Edward Z. Yang Test Plan: validate Reviewers: simonmar, austin Subscribers: thomie, carter, ezyang, simonmar Differential Revision: https://phabricator.haskell.org/D342 --- compiler/main/DriverPipeline.hs | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'compiler/main') diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 562c7d74be..1977f0edcf 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1595,26 +1595,26 @@ mkExtraObjToLinkIntoBinary dflags = do mkExtraObj dflags "c" (showSDoc dflags main) - where - main - | gopt Opt_NoHsMain dflags = Outputable.empty - | otherwise = vcat [ - ptext (sLit "#include \"Rts.h\""), - ptext (sLit "extern StgClosure ZCMain_main_static_closure;"), - ptext (sLit "int main(int argc, char *argv[])"), - char '{', - ptext (sLit " RtsConfig __conf = defaultRtsConfig;"), - ptext (sLit " __conf.rts_opts_enabled = ") - <> text (show (rtsOptsEnabled dflags)) <> semi, - case rtsOpts dflags of - Nothing -> Outputable.empty - Just opts -> ptext (sLit " __conf.rts_opts= ") <> - text (show opts) <> semi, - ptext (sLit " __conf.rts_hs_main = rtsTrue;"), - ptext (sLit " return hs_main(argc, argv, &ZCMain_main_static_closure,__conf);"), - char '}', - char '\n' -- final newline, to keep gcc happy - ] + where + main + | gopt Opt_NoHsMain dflags = Outputable.empty + | otherwise = vcat [ + text "#include \"Rts.h\"", + text "extern StgClosure ZCMain_main_static_closure;", + text "int main(int argc, char *argv[])", + char '{', + text " RtsConfig __conf = defaultRtsConfig;", + text " __conf.rts_opts_enabled = " + <> text (show (rtsOptsEnabled dflags)) <> semi, + case rtsOpts dflags of + Nothing -> Outputable.empty + Just opts -> ptext (sLit " __conf.rts_opts= ") <> + text (show opts) <> semi, + text " __conf.rts_hs_main = rtsTrue;", + text " return hs_main(argc,argv,&ZCMain_main_static_closure,__conf);", + char '}', + char '\n' -- final newline, to keep gcc happy + ] -- Write out the link info section into a new assembly file. Previously -- this was included as inline assembly in the main.c file but this -- cgit v1.2.1