summaryrefslogtreecommitdiff
path: root/ghc/compiler/deSugar/Desugar.lhs
diff options
context:
space:
mode:
authorsimonpj <unknown>2000-11-15 17:07:36 +0000
committersimonpj <unknown>2000-11-15 17:07:36 +0000
commitea659be5faea43df1b2c113d2f22947dff23367e (patch)
treee606f6675a9865fd5d2f74c307735d785bc06334 /ghc/compiler/deSugar/Desugar.lhs
parent894a579234e98634a0f50df380d88813e167d368 (diff)
downloadhaskell-ea659be5faea43df1b2c113d2f22947dff23367e.tar.gz
[project @ 2000-11-15 17:07:34 by simonpj]
I finally got tired of not having splitTyConApp tyConAppTyCon tyConAppArgs (Previously we called splitTyConApp_maybe, but it's a pain in the neck.)
Diffstat (limited to 'ghc/compiler/deSugar/Desugar.lhs')
-rw-r--r--ghc/compiler/deSugar/Desugar.lhs28
1 files changed, 15 insertions, 13 deletions
diff --git a/ghc/compiler/deSugar/Desugar.lhs b/ghc/compiler/deSugar/Desugar.lhs
index 1745615d5f..49f8939bbd 100644
--- a/ghc/compiler/deSugar/Desugar.lhs
+++ b/ghc/compiler/deSugar/Desugar.lhs
@@ -57,28 +57,30 @@ deSugar dflags mod_name unqual hst
tc_binds = all_binds,
tc_rules = rules,
tc_fords = fo_decls})
- = do
- showPass dflags "Desugar"
- us <- mkSplitUniqSupply 'd'
+ = do { showPass dflags "Desugar"
+ ; us <- mkSplitUniqSupply 'd'
-- Do desugaring
- let (result, ds_warns) =
- initDs dflags us (hst,pcs,global_val_env) mod_name
- (dsProgram mod_name all_binds rules fo_decls)
- (ds_binds, ds_rules, _, _, _) = result
+ ; let (result, ds_warns) = initDs dflags us (hst,pcs,global_val_env) mod_name
+ (dsProgram mod_name all_binds rules fo_decls)
+ (ds_binds, ds_rules, _, _, _) = result
-- Display any warnings
- doIfSet (not (isEmptyBag ds_warns))
- (printErrs unqual (pprBagOfWarnings ds_warns))
+ ; doIfSet (not (isEmptyBag ds_warns))
+ (printErrs unqual (pprBagOfWarnings ds_warns))
-- Lint result if necessary
- let do_dump_ds = dopt Opt_D_dump_ds dflags
- endPass dflags "Desugar" do_dump_ds ds_binds
+ ; let do_dump_ds = dopt Opt_D_dump_ds dflags
+ ; endPass dflags "Desugar" do_dump_ds ds_binds
-- Dump output
- doIfSet do_dump_ds (printDump (ppr_ds_rules ds_rules))
+ ; doIfSet do_dump_ds (printDump (ppr_ds_rules ds_rules))
- return result
+ ; return result
+ }
+
+-- deSugarExpr dflags unqual hst tc_expr
+-- = do {
dsProgram mod_name all_binds rules fo_decls
= dsMonoBinds auto_scc all_binds [] `thenDs` \ core_prs ->