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.]
+
%************************************************************************
{-# 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
--
| 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)]
-- 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_`