From: simonpj Date: Mon, 18 Nov 2002 14:25:29 +0000 (+0000) Subject: [project @ 2002-11-18 14:25:29 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~1443 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fa654d6b16ecda7cc8cb780792ca10ec0e227555;p=ghc-hetmet.git [project @ 2002-11-18 14:25:29 by simonpj] Comments --- diff --git a/ghc/compiler/basicTypes/MkId.lhs b/ghc/compiler/basicTypes/MkId.lhs index 1ad85bc..c8b00b7 100644 --- a/ghc/compiler/basicTypes/MkId.lhs +++ b/ghc/compiler/basicTypes/MkId.lhs @@ -589,7 +589,22 @@ mkReboxingAlt us con args rhs Selecting a field for a dictionary. If there is just one field, then there's nothing to do. -ToDo: unify with mkRecordSelId. +Dictionary selectors may get nested forall-types. Thus: + + class Foo a where + op :: forall b. Ord b => a -> b -> b + +Then the top-level type for op is + + op :: forall a. Foo a => + forall b. Ord b => + a -> b -> b + +This is unlike ordinary record selectors, which have all the for-alls +at the outside. When dealing with classes it's very convenient to +recover the original type signature from the class op selector. + +ToDo: unify with mkRecordSelId? \begin{code} mkDictSelId :: Name -> Class -> Id