From: simonmar Date: Wed, 14 Feb 2001 14:02:58 +0000 (+0000) Subject: [project @ 2001-02-14 14:02:58 by simonmar] X-Git-Tag: Approximately_9120_patches~2623 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9020d2273a187b50af70d7ea8d5e9df96237a8a5;p=ghc-hetmet.git [project @ 2001-02-14 14:02:58 by simonmar] Tidy the type we get back from typecheckExpr. --- diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 6bb6d6f..ee0dd3f 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -16,7 +16,7 @@ module HscMain ( HscResult(..), hscMain, import RdrHsSyn ( RdrNameHsExpr ) import Rename ( renameExpr ) import Unique ( Uniquable(..) ) -import Type ( Type, splitTyConApp_maybe ) +import Type ( Type, splitTyConApp_maybe, tidyType ) import PrelNames ( ioTyConKey ) import ByteCodeGen ( byteCodeGen ) #endif @@ -64,6 +64,7 @@ import HscTypes ( ModDetails, ModIface(..), PersistentCompilerState(..), typeEnvClasses, typeEnvTyCons, emptyIfaceTable ) import FiniteMap ( FiniteMap, plusFM, emptyFM, addToFM ) import OccName ( OccName ) +import VarEnv ( emptyTidyEnv ) import Name ( Name, nameModule, nameOccName, getName, isGlobalName, emptyNameEnv ) import Module ( Module, lookupModuleEnvByName ) @@ -436,6 +437,8 @@ hscExpr dflags wrap_io hst hit pcs0 this_module expr Nothing -> return ({-WAS:pcs1-} pcs0, Nothing); Just (pcs2, tc_expr, ty) -> do + let tidy_ty = tidyType emptyTidyEnv ty; + -- Desugar it ds_expr <- deSugarExpr dflags pcs2 hst this_module print_unqual tc_expr; @@ -451,7 +454,7 @@ hscExpr dflags wrap_io hst hit pcs0 this_module expr -- Convert to BCOs bcos <- coreExprToBCOs dflags sat_expr - return (pcs2, Just (bcos, print_unqual, ty)); + return (pcs2, Just (bcos, print_unqual, tidy_ty)); }}}} hscParseExpr :: DynFlags -> String -> IO (Maybe RdrNameHsExpr)