From: simonpj Date: Wed, 7 May 2003 08:29:48 +0000 (+0000) Subject: [project @ 2003-05-07 08:29:42 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~924 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fe548aebdad3520e51d92fcda6bec9d26d69aa4a;p=ghc-hetmet.git [project @ 2003-05-07 08:29:42 by simonpj] Comments and formatting --- diff --git a/ghc/compiler/basicTypes/DataCon.lhs b/ghc/compiler/basicTypes/DataCon.lhs index 61c71d6..3818580 100644 --- a/ghc/compiler/basicTypes/DataCon.lhs +++ b/ghc/compiler/basicTypes/DataCon.lhs @@ -151,6 +151,12 @@ So now I've taken the stupid context out. I simply deal with it separately in the type checker on occurrences of a constructor, either in an expression or in a pattern. +[May 2003: actually I think this decision could evasily be reversed now, +and probably should be. Generics could be disabled for types with +a stupid context; record updates now (H98) needs the context too; etc. +It's an unforced change, so I'm leaving it for now --- but it does seem +odd that the wrapper doesn't include the stupid context.] + %************************************************************************ diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index ab487d1..366a435 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,6 +1,6 @@ {-# OPTIONS -#include "Linker.h" #-} ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.151 2003/04/23 10:42:36 simonmar Exp $ +-- $Id: InteractiveUI.hs,v 1.152 2003/05/07 08:29:48 simonpj Exp $ -- -- GHC Interactive User Interface -- @@ -501,8 +501,8 @@ info s = do | fix == defaultFixity = empty | otherwise = ppr fix <+> (if isSymOcc (nameOccName name) - then ppr name - else char '`' <> ppr name <> char '`') + then ppr name + else char '`' <> ppr name <> char '`') showTyThing (AClass cl) = hcat [ppr cl, text " is a class", showSrcLoc (className cl)] diff --git a/ghc/compiler/typecheck/TcExpr.lhs b/ghc/compiler/typecheck/TcExpr.lhs index bb8d181..db7638a 100644 --- a/ghc/compiler/typecheck/TcExpr.lhs +++ b/ghc/compiler/typecheck/TcExpr.lhs @@ -877,7 +877,8 @@ tcId name -- Look up the Id and instantiate its type -- We treat data constructors differently, because we have to generate -- constraints for their silly theta, which no longer appears in - -- the type of dataConWrapId. It's dual to TcPat.tcConstructor + -- the type of dataConWrapId (see note on "stupid context" in DataCon.lhs + -- It's dual to TcPat.tcConstructor inst_data_con data_con = tcInstDataCon orig data_con `thenM` \ (ty_args, ex_dicts, arg_tys, result_ty, _) -> extendLIEs ex_dicts `thenM_`