+ Right rdr_module -> do {
+
+ -------------------
+ -- RENAME and TYPECHECK
+ -------------------
+ ; (tc_msgs, maybe_tc_result) <- _scc_ "Typecheck-Rename"
+ tcRnModule hsc_env rdr_module
+ ; msg_act tc_msgs
+ ; case maybe_tc_result of {
+ Nothing -> return (Left HscFail);
+ Just tc_result -> do {
+
+ -------------------
+ -- DESUGAR
+ -------------------
+ ; (warns, maybe_ds_result) <- _scc_ "DeSugar"
+ deSugar hsc_env tc_result
+ ; msg_act (warns, emptyBag)
+ ; case maybe_ds_result of
+ Nothing -> return (Left HscFail);
+ Just ds_result -> return (Right ds_result);
+ }}}}}
+
+
+hscFileCheck hsc_env msg_act hspp_file = do {
+ -------------------
+ -- PARSE
+ -------------------
+ ; maybe_parsed <- myParseModule (hsc_dflags hsc_env) hspp_file
+
+ ; case maybe_parsed of {
+ Left err -> do { msg_act (unitBag err, emptyBag) ;
+ ; return HscFail ;
+ };
+ Right rdr_module -> hscBufferTypecheck hsc_env rdr_module msg_act
+ }}
+