From: simonpj Date: Mon, 27 Oct 2003 14:07:21 +0000 (+0000) Subject: [project @ 2003-10-27 14:07:01 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~322 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7222d3c0c93acdd47117b0f94cfb8858bd3c3789;hp=1f7a21ac55ad5769632c9d5e590e4e87f4d4f76a;p=ghc-hetmet.git [project @ 2003-10-27 14:07:01 by simonpj] Comments only --- diff --git a/ghc/compiler/deSugar/Desugar.lhs b/ghc/compiler/deSugar/Desugar.lhs index 67c6261..35083bd 100644 --- a/ghc/compiler/deSugar/Desugar.lhs +++ b/ghc/compiler/deSugar/Desugar.lhs @@ -84,13 +84,13 @@ deSugar hsc_env ; doIfSet (not (isEmptyBag warnings)) (printErrs warn_doc) - -- if warnings are considered errors, leave. + -- If warnings are considered errors, leave. ; if errorsFound dflags (warns, emptyBag) then return Nothing - else do { + else do -- Lint result if necessary - endPass dflags "Desugar" Opt_D_dump_ds ds_binds + { endPass dflags "Desugar" Opt_D_dump_ds ds_binds -- Dump output ; doIfSet (dopt Opt_D_dump_ds dflags) diff --git a/ghc/compiler/typecheck/TcHsType.lhs b/ghc/compiler/typecheck/TcHsType.lhs index 7e9338f..b1f9e97 100644 --- a/ghc/compiler/typecheck/TcHsType.lhs +++ b/ghc/compiler/typecheck/TcHsType.lhs @@ -303,9 +303,16 @@ kcHsType (HsForAllTy exp tv_names context ty) = kcHsTyVars tv_names $ \ tv_names' -> kcHsContext context `thenM` \ ctxt' -> kcLiftedType ty `thenM` \ ty' -> - -- The body of a forall must be of kind * - -- In principle, I suppose, we could allow unlifted types, - -- but it seems simpler to stick to lifted types for now. + -- The body of a forall must be a type, but in principle + -- there's no reason to prohibit *unlifted* types. + -- In fact, GHC can itself construct a function with an + -- unboxed tuple inside a for-all (via CPR analyis; see + -- typecheck/should_compile/tc170) + -- + -- Still, that's only for internal interfaces, which aren't + -- kind-checked, and it's a bit inconvenient to use kcTypeType + -- here (because it doesn't return the result kind), so I'm + -- leaving it as lifted types for now. returnM (HsForAllTy exp tv_names' ctxt' ty', liftedTypeKind) ---------------------------