From: sewardj Date: Thu, 12 Oct 2000 12:31:11 +0000 (+0000) Subject: [project @ 2000-10-12 12:31:11 by sewardj] X-Git-Tag: Approximately_9120_patches~3620 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=62d7d2266186a335c42edacfe6bae76b92200e55;p=ghc-hetmet.git [project @ 2000-10-12 12:31:11 by sewardj] Julians progress --- diff --git a/ghc/compiler/Makefile b/ghc/compiler/Makefile index ae1d2fa..ddc4032 100644 --- a/ghc/compiler/Makefile +++ b/ghc/compiler/Makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.94 2000/10/10 13:13:17 simonmar Exp $ +# $Id: Makefile,v 1.95 2000/10/12 12:31:11 sewardj Exp $ TOP = .. include $(TOP)/mk/boilerplate.mk @@ -361,7 +361,7 @@ parser/Parser.hs : parser/Parser.y #----------------------------------------------------------------------------- # Linking -SRC_LD_OPTS += -no-link-chk +SRC_LD_OPTS += -no-link-chk -ldl ifneq "$(GhcWithHscBuiltViaC)" "YES" ifeq "$(GhcReportCompiles)" "YES" diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index cfeadd4..aeb12b2 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -60,12 +60,18 @@ hscMain -> IO HscResult hscMain flags core_cmds stg_cmds summary maybe_old_iface - output_filename mod_details pcs = + output_filename mod_details pcs1 = -------------------------- Reader ---------------- show_pass "Parser" >> _scc_ "Parser" + let src_filename -- name of the preprocessed source file + = case ms_ppsource summary of + Just (filename, fingerprint) -> filename + Nothing -> pprPanic "hscMain:summary is not of a source module" + (ppr summary) + buf <- hGetStringBuffer True{-expand tabs-} src_filename let glaexts | opt_GlasgowExts = 1# @@ -75,7 +81,7 @@ hscMain flags core_cmds stg_cmds summary maybe_old_iface context = [], glasgow_exts = glaexts, loc = mkSrcLoc src_filename 1 } of { - PFailed err -> return (CompErrs pcs err); + PFailed err -> return (CompErrs pcs err) POk _ rdr_module@(HsModule mod_name _ _ _ _ _ _) -> @@ -132,11 +138,11 @@ hscMain flags core_cmds stg_cmds summary maybe_old_iface -------------------------- Main Core-language transformations ---------------- _scc_ "Core2Core" - core2core core_cmds desugared rules >>= \ (simplified, orphan_rules) -> + core2core core_cmds desugared rules >>= \ (simplified, orphan_rules) -> -- Do the final tidy-up tidyCorePgm tidy_uniqs this_mod - simplified orphan_rules >>= \ (tidy_binds, tidy_orphan_rules) -> + simplified orphan_rules >>= \ (tidy_binds, tidy_orphan_rules) -> -- Run the occurrence analyser one last time, so that -- dead binders get dead-binder info. This is exploited by