[project @ 2003-05-07 08:29:42 by simonpj]
authorsimonpj <unknown>
Wed, 7 May 2003 08:29:48 +0000 (08:29 +0000)
committersimonpj <unknown>
Wed, 7 May 2003 08:29:48 +0000 (08:29 +0000)
Comments and formatting

ghc/compiler/basicTypes/DataCon.lhs
ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/typecheck/TcExpr.lhs

index 61c71d6..3818580 100644 (file)
@@ -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.]
+
 
 
 %************************************************************************
index ab487d1..366a435 100644 (file)
@@ -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)]
index bb8d181..db7638a 100644 (file)
@@ -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_`