2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
4 \section[Inst]{The @Inst@ type: dictionaries or method instances}
7 #include "HsVersions.h"
10 Inst(..), -- Visible only to TcSimplify
12 InstOrigin(..), OverloadedLit(..),
13 SYN_IE(LIE), emptyLIE, unitLIE, plusLIE, consLIE, zonkLIE, plusLIEs,
15 SYN_IE(InstanceMapper),
17 newDicts, newDictsAtLoc, newMethod, newMethodWithGivenTy, newOverloadedLit,
19 instType, tyVarsOfInst, lookupInst, lookupSimpleInst,
26 instBindingRequired, instCanBeGeneralised,
32 IMPORT_1_3(Ratio(Rational))
34 import HsSyn ( HsLit(..), HsExpr(..), HsBinds, Fixity, MonoBinds(..),
35 InPat, OutPat, Stmt, DoOrListComp, Match, GRHSsAndBinds,
36 ArithSeqInfo, HsType, Fake )
37 import RnHsSyn ( SYN_IE(RenamedArithSeqInfo), SYN_IE(RenamedHsExpr) )
38 import TcHsSyn ( TcIdOcc(..), SYN_IE(TcExpr), SYN_IE(TcIdBndr),
39 SYN_IE(TcDictBinds), SYN_IE(TcMonoBinds),
40 mkHsTyApp, mkHsDictApp, tcIdTyVars )
43 import TcEnv ( tcLookupGlobalValueByKey, tcLookupTyConByKey )
44 import TcType ( SYN_IE(TcType), SYN_IE(TcRhoType), TcMaybe, SYN_IE(TcTyVarSet),
45 tcInstType, zonkTcType, tcSplitForAllTy, tcSplitRhoTy )
47 import Bag ( emptyBag, unitBag, unionBags, unionManyBags,
48 listToBag, consBag, Bag )
49 import Class ( classInstEnv,
50 SYN_IE(Class), GenClass, SYN_IE(ClassInstEnv), SYN_IE(ClassOp)
52 import ErrUtils ( addErrLoc, SYN_IE(Error) )
53 import Id ( GenId, idType, mkInstId, SYN_IE(Id) )
54 import PrelInfo ( isCcallishClass, isNoDictClass )
55 import MatchEnv ( lookupMEnv, insertMEnv )
56 import Name ( OccName(..), Name, mkLocalName,
57 mkSysLocalName, occNameString, getOccName )
59 import PprType ( GenClass, TyCon, GenType, GenTyVar, pprParendGenType )
60 import PprStyle ( PprStyle(..) )
62 import SpecEnv ( SpecEnv )
63 import SrcLoc ( SrcLoc, noSrcLoc )
64 import Type ( GenType, eqSimpleTy, instantiateTy,
65 isTyVarTy, mkDictTy, splitForAllTy, splitSigmaTy,
66 splitRhoTy, matchTy, tyVarsOfType, tyVarsOfTypes,
69 import TyVar ( unionTyVarSets, GenTyVar )
70 import TysPrim ( intPrimTy )
71 import TysWiredIn ( intDataCon, integerTy )
72 import Unique ( showUnique, fromRationalClassOpKey, rationalTyConKey,
73 fromIntClassOpKey, fromIntegerClassOpKey, Unique
75 import Util ( panic, zipEqual, zipWithEqual, assoc, assertPanic, pprTrace{-ToDo:rm-} )
76 #if __GLASGOW_HASKELL__ >= 202
81 %************************************************************************
83 \subsection[Inst-collections]{LIE: a collection of Insts}
85 %************************************************************************
88 type LIE s = Bag (Inst s)
91 unitLIE inst = unitBag inst
92 plusLIE lie1 lie2 = lie1 `unionBags` lie2
93 consLIE inst lie = inst `consBag` lie
94 plusLIEs lies = unionManyBags lies
96 zonkLIE :: LIE s -> NF_TcM s (LIE s)
97 zonkLIE lie = mapBagNF_Tc zonkInst lie
100 %************************************************************************
102 \subsection[Inst-types]{@Inst@ types}
104 %************************************************************************
106 An @Inst@ is either a dictionary, an instance of an overloaded
107 literal, or an instance of an overloaded value. We call the latter a
108 ``method'' even though it may not correspond to a class operation.
109 For example, we might have an instance of the @double@ function at
110 type Int, represented by
112 Method 34 doubleId [Int] origin
118 Class -- The type of the dict is (c t), where
119 (TcType s) -- c is the class and t the type;
126 (TcIdOcc s) -- The overloaded function
127 -- This function will be a global, local, or ClassOpId;
128 -- inside instance decls (only) it can also be an InstId!
129 -- The id needn't be completely polymorphic.
130 -- You'll probably find its name (for documentation purposes)
131 -- inside the InstOrigin
133 [TcType s] -- The types to which its polymorphic tyvars
134 -- should be instantiated.
135 -- These types must saturate the Id's foralls.
137 (TcRhoType s) -- Cached: (type-of-id applied to inst_tys)
138 -- If this type is (theta => tau) then the type of the Method
139 -- is tau, and the method can be built by saying
141 -- where dicts are constructed from theta
149 (TcType s) -- The type at which the literal is used
150 (InstOrigin s) -- Always a literal; but more convenient to carry this around
154 = OverloadedIntegral Integer -- The number
155 | OverloadedFractional Rational -- The number
157 getInstOrigin (Dict u clas ty origin loc) = origin
158 getInstOrigin (Method u clas ty rho origin loc) = origin
159 getInstOrigin (LitInst u lit ty origin loc) = origin
166 newDicts :: InstOrigin s
167 -> [(Class, TcType s)]
168 -> NF_TcM s (LIE s, [TcIdOcc s])
170 = tcGetSrcLoc `thenNF_Tc` \ loc ->
171 newDictsAtLoc orig loc theta `thenNF_Tc` \ (dicts, ids) ->
172 returnNF_Tc (listToBag dicts, ids)
174 tcGetUniques (length theta) `thenNF_Tc` \ new_uniqs ->
176 mk_dict u (clas, ty) = Dict u clas ty orig loc
177 dicts = zipWithEqual "newDicts" mk_dict new_uniqs theta
179 returnNF_Tc (listToBag dicts, map instToId dicts)
182 -- Local function, similar to newDicts,
183 -- but with slightly different interface
184 newDictsAtLoc :: InstOrigin s
186 -> [(Class, TcType s)]
187 -> NF_TcM s ([Inst s], [TcIdOcc s])
188 newDictsAtLoc orig loc theta =
189 tcGetUniques (length theta) `thenNF_Tc` \ new_uniqs ->
191 mk_dict u (clas, ty) = Dict u clas ty orig loc
192 dicts = zipWithEqual "newDictsAtLoc" mk_dict new_uniqs theta
194 returnNF_Tc (dicts, map instToId dicts)
196 newMethod :: InstOrigin s
199 -> NF_TcM s (LIE s, TcIdOcc s)
200 newMethod orig id tys
201 = -- Get the Id type and instantiate it at the specified types
203 RealId id -> let (tyvars, rho) = splitForAllTy (idType id)
205 (if length tyvars /= length tys then pprTrace "newMethod" (ppr PprDebug (idType id)) else \x->x) $
206 tcInstType (zip{-Equal "newMethod"-} tyvars tys) rho
207 TcId id -> tcSplitForAllTy (idType id) `thenNF_Tc` \ (tyvars, rho) ->
208 returnNF_Tc (instantiateTy (zipEqual "newMethod(2)" tyvars tys) rho)
209 ) `thenNF_Tc` \ rho_ty ->
210 -- Our friend does the rest
211 newMethodWithGivenTy orig id tys rho_ty
214 newMethodWithGivenTy orig id tys rho_ty
215 = tcGetSrcLoc `thenNF_Tc` \ loc ->
216 tcGetUnique `thenNF_Tc` \ new_uniq ->
218 meth_inst = Method new_uniq id tys rho_ty orig loc
220 returnNF_Tc (unitLIE meth_inst, instToId meth_inst)
222 newMethodAtLoc :: InstOrigin s -> SrcLoc -> Id -> [TcType s] -> NF_TcM s (Inst s, TcIdOcc s)
223 newMethodAtLoc orig loc real_id tys -- Local function, similar to newMethod but with
224 -- slightly different interface
225 = -- Get the Id type and instantiate it at the specified types
227 (tyvars,rho) = splitForAllTy (idType real_id)
229 tcInstType (zipEqual "newMethodAtLoc" tyvars tys) rho `thenNF_Tc` \ rho_ty ->
230 tcGetUnique `thenNF_Tc` \ new_uniq ->
232 meth_inst = Method new_uniq (RealId real_id) tys rho_ty orig loc
234 returnNF_Tc (meth_inst, instToId meth_inst)
236 newOverloadedLit :: InstOrigin s
239 -> NF_TcM s (LIE s, TcIdOcc s)
240 newOverloadedLit orig lit ty
241 = tcGetSrcLoc `thenNF_Tc` \ loc ->
242 tcGetUnique `thenNF_Tc` \ new_uniq ->
244 lit_inst = LitInst new_uniq lit ty orig loc
246 returnNF_Tc (unitLIE lit_inst, instToId lit_inst)
251 instToId :: Inst s -> TcIdOcc s
252 instToId (Dict u clas ty orig loc)
253 = TcId (mkInstId u (mkDictTy clas ty) (mkLocalName u str loc))
255 str = VarOcc (SLIT("d.") _APPEND_ (occNameString (getOccName clas)))
257 instToId (Method u id tys rho_ty orig loc)
258 = TcId (mkInstId u tau_ty (mkLocalName u occ loc))
261 (_, tau_ty) = splitRhoTy rho_ty
262 -- I hope we don't need tcSplitRhoTy...
263 -- NB The method Id has just the tau type
265 instToId (LitInst u list ty orig loc)
266 = TcId (mkInstId u ty (mkSysLocalName u SLIT("lit") loc))
270 instType :: Inst s -> TcType s
271 instType (Dict _ clas ty _ _) = mkDictTy clas ty
272 instType (LitInst _ _ ty _ _) = ty
273 instType (Method _ id tys ty _ _) = ty
279 Zonking makes sure that the instance types are fully zonked,
280 but doesn't do the same for the Id in a Method. There's no
281 need, and it's a lot of extra work.
284 zonkInst :: Inst s -> NF_TcM s (Inst s)
285 zonkInst (Dict u clas ty orig loc)
286 = zonkTcType ty `thenNF_Tc` \ new_ty ->
287 returnNF_Tc (Dict u clas new_ty orig loc)
289 zonkInst (Method u id tys rho orig loc) -- Doesn't zonk the id!
290 = mapNF_Tc zonkTcType tys `thenNF_Tc` \ new_tys ->
291 zonkTcType rho `thenNF_Tc` \ new_rho ->
292 returnNF_Tc (Method u id new_tys new_rho orig loc)
294 zonkInst (LitInst u lit ty orig loc)
295 = zonkTcType ty `thenNF_Tc` \ new_ty ->
296 returnNF_Tc (LitInst u lit new_ty orig loc)
301 tyVarsOfInst :: Inst s -> TcTyVarSet s
302 tyVarsOfInst (Dict _ _ ty _ _) = tyVarsOfType ty
303 tyVarsOfInst (Method _ id tys rho _ _) = tyVarsOfTypes tys `unionTyVarSets` tcIdTyVars id
304 -- The id might not be a RealId; in the case of
305 -- locally-overloaded class methods, for example
306 tyVarsOfInst (LitInst _ _ ty _ _) = tyVarsOfType ty
309 @matchesInst@ checks when two @Inst@s are instances of the same
310 thing at the same type, even if their uniques differ.
313 matchesInst :: Inst s -> Inst s -> Bool
315 matchesInst (Dict _ clas1 ty1 _ _) (Dict _ clas2 ty2 _ _)
316 = clas1 == clas2 && ty1 `eqSimpleTy` ty2
318 matchesInst (Method _ id1 tys1 _ _ _) (Method _ id2 tys2 _ _ _)
320 && and (zipWith eqSimpleTy tys1 tys2)
321 && length tys1 == length tys2
323 matchesInst (LitInst _ lit1 ty1 _ _) (LitInst _ lit2 ty2 _ _)
324 = lit1 `eq` lit2 && ty1 `eqSimpleTy` ty2
326 (OverloadedIntegral i1) `eq` (OverloadedIntegral i2) = i1 == i2
327 (OverloadedFractional f1) `eq` (OverloadedFractional f2) = f1 == f2
330 matchesInst other1 other2 = False
337 isDict :: Inst s -> Bool
338 isDict (Dict _ _ _ _ _) = True
341 isTyVarDict :: Inst s -> Bool
342 isTyVarDict (Dict _ _ ty _ _) = isTyVarTy ty
343 isTyVarDict other = False
346 Two predicates which deal with the case where class constraints don't
347 necessarily result in bindings. The first tells whether an @Inst@
348 must be witnessed by an actual binding; the second tells whether an
349 @Inst@ can be generalised over.
352 instBindingRequired :: Inst s -> Bool
353 instBindingRequired (Dict _ clas _ _ _) = not (isNoDictClass clas)
354 instBindingRequired other = True
356 instCanBeGeneralised :: Inst s -> Bool
357 instCanBeGeneralised (Dict _ clas _ _ _) = not (isCcallishClass clas)
358 instCanBeGeneralised other = True
364 ToDo: improve these pretty-printing things. The ``origin'' is really only
365 relevant in error messages.
368 instance Outputable (Inst s) where
369 ppr sty inst = ppr_inst sty empty (\ o l -> empty) inst
371 pprInst sty hdr inst = ppr_inst sty hdr (\ o l -> pprOrigin hdr o l sty) inst
373 ppr_inst sty hdr ppr_orig (LitInst u lit ty orig loc)
374 = hang (ppr_orig orig loc)
376 OverloadedIntegral i -> integer i
377 OverloadedFractional f -> rational f,
382 ppr_inst sty hdr ppr_orig (Dict u clas ty orig loc)
383 = hang (ppr_orig orig loc)
384 4 (hsep [ppr sty clas, pprParendGenType sty ty, show_uniq sty u])
386 ppr_inst sty hdr ppr_orig (Method u id tys rho orig loc)
387 = hang (ppr_orig orig loc)
388 4 (hsep [ppr sty id, ptext SLIT("at"), interppSP sty tys, show_uniq sty u])
390 show_uniq PprDebug u = ppr PprDebug u
391 show_uniq sty u = empty
394 Printing in error messages
397 noInstanceErr inst sty = hang (ptext SLIT("No instance for:")) 4 (ppr sty inst)
400 %************************************************************************
402 \subsection[InstEnv-types]{Type declarations}
404 %************************************************************************
407 type InstanceMapper = Class -> (ClassInstEnv, ClassOp -> SpecEnv)
410 A @ClassInstEnv@ lives inside a class, and identifies all the instances
411 of that class. The @Id@ inside a ClassInstEnv mapping is the dfun for
414 There is an important consistency constraint between the @MatchEnv@s
415 in and the dfun @Id@s inside them: the free type variables of the
416 @Type@ key in the @MatchEnv@ must be a subset of the universally-quantified
417 type variables of the dfun. Thus, the @ClassInstEnv@ for @Eq@ might
418 contain the following entry:
420 [a] ===> dfun_Eq_List :: forall a. Eq a => Eq [a]
422 The "a" in the pattern must be one of the forall'd variables in
428 TcDictBinds s) -- The new binding
432 lookupInst dict@(Dict _ clas ty orig loc)
433 = case lookupMEnv matchTy (get_inst_env clas orig) ty of
434 Nothing -> tcAddSrcLoc loc $
435 tcAddErrCtxt (pprOrigin ""{-hdr-} orig loc) $
436 failTc (noInstanceErr dict)
440 (tyvars, rho) = splitForAllTy (idType dfun_id)
441 ty_args = map (assoc "lookupInst" tenv) tyvars
442 -- tenv should bind all the tyvars
444 tcInstType tenv rho `thenNF_Tc` \ dfun_rho ->
446 (theta, tau) = splitRhoTy dfun_rho
448 newDictsAtLoc orig loc theta `thenNF_Tc` \ (dicts, dict_ids) ->
450 rhs = mkHsDictApp (mkHsTyApp (HsVar (RealId dfun_id)) ty_args) dict_ids
452 returnTc (dicts, VarMonoBind (instToId dict) rhs)
457 lookupInst inst@(Method _ id tys rho orig loc)
458 = tcSplitRhoTy rho `thenNF_Tc` \ (theta, _) ->
459 newDictsAtLoc orig loc theta `thenNF_Tc` \ (dicts, dict_ids) ->
460 returnTc (dicts, VarMonoBind (instToId inst) (mkHsDictApp (mkHsTyApp (HsVar id) tys) dict_ids))
464 lookupInst inst@(LitInst u (OverloadedIntegral i) ty orig loc)
465 | i >= toInteger minInt && i <= toInteger maxInt
466 = -- It's overloaded but small enough to fit into an Int
467 tcLookupGlobalValueByKey fromIntClassOpKey `thenNF_Tc` \ from_int ->
468 newMethodAtLoc orig loc from_int [ty] `thenNF_Tc` \ (method_inst, method_id) ->
469 returnTc ([method_inst], VarMonoBind (instToId inst) (HsApp (HsVar method_id) int_lit))
472 = -- Alas, it is overloaded and a big literal!
473 tcLookupGlobalValueByKey fromIntegerClassOpKey `thenNF_Tc` \ from_integer ->
474 newMethodAtLoc orig loc from_integer [ty] `thenNF_Tc` \ (method_inst, method_id) ->
475 returnTc ([method_inst], VarMonoBind (instToId inst) (HsApp (HsVar method_id) (HsLitOut (HsInt i) integerTy)))
477 intprim_lit = HsLitOut (HsIntPrim i) intPrimTy
478 int_lit = HsApp (HsVar (RealId intDataCon)) intprim_lit
480 lookupInst inst@(LitInst u (OverloadedFractional f) ty orig loc)
481 = tcLookupGlobalValueByKey fromRationalClassOpKey `thenNF_Tc` \ from_rational ->
483 -- The type Rational isn't wired in so we have to conjure it up
484 tcLookupTyConByKey rationalTyConKey `thenNF_Tc` \ rational_tycon ->
486 rational_ty = mkSynTy rational_tycon []
487 rational_lit = HsLitOut (HsFrac f) rational_ty
489 newMethodAtLoc orig loc from_rational [ty] `thenNF_Tc` \ (method_inst, method_id) ->
490 returnTc ([method_inst], VarMonoBind (instToId inst) (HsApp (HsVar method_id) rational_lit))
493 There is a second, simpler interface, when you want an instance of a
494 class at a given nullary type constructor. It just returns the
495 appropriate dictionary if it exists. It is used only when resolving
496 ambiguous dictionaries.
499 lookupSimpleInst :: ClassInstEnv
501 -> Type -- Look up (c,t)
502 -> TcM s [(Class,Type)] -- Here are the needed (c,t)s
504 lookupSimpleInst class_inst_env clas ty
505 = case (lookupMEnv matchTy class_inst_env ty) of
506 Nothing -> failTc (noSimpleInst clas ty)
507 Just (dfun,tenv) -> returnTc [(c,instantiateTy tenv t) | (c,t) <- theta]
509 (_, theta, _) = splitSigmaTy (idType dfun)
511 noSimpleInst clas ty sty
512 = sep [ptext SLIT("No instance for class"), ppr sty clas,
513 ptext SLIT("at type"), ppr sty ty]
517 @mkInstSpecEnv@ is used to construct the @SpecEnv@ for a dfun.
518 It does it by filtering the class's @InstEnv@. All pretty shady stuff.
521 mkInstSpecEnv clas inst_ty inst_tvs inst_theta = panic "mkInstSpecEnv"
525 mkInstSpecEnv :: Class -- class
526 -> Type -- instance type
527 -> [TyVarTemplate] -- instance tyvars
528 -> ThetaType -- superclasses dicts
529 -> SpecEnv -- specenv for dfun of instance
531 mkInstSpecEnv clas inst_ty inst_tvs inst_theta
532 = mkSpecEnv (catMaybes (map maybe_spec_info matches))
534 matches = matchMEnv matchTy (classInstEnv clas) inst_ty
536 maybe_spec_info (_, match_info, MkInstTemplate dfun _ [])
537 = Just (SpecInfo (map (assocMaybe match_info) inst_tvs) (length inst_theta) dfun)
538 maybe_spec_info (_, match_info, _)
545 :: ClassInstEnv -- Incoming envt
546 -> Type -- The instance type: inst_ty
547 -> Id -- Dict fun id to apply. Free tyvars of inst_ty must
548 -- be the same as the forall'd tyvars of the dfun id.
550 ClassInstEnv -- Success
551 (Type, Id) -- Offending overlap
553 addClassInst inst_env inst_ty dfun_id = insertMEnv matchTy inst_env inst_ty dfun_id
558 %************************************************************************
560 \subsection[Inst-origin]{The @InstOrigin@ type}
562 %************************************************************************
564 The @InstOrigin@ type gives information about where a dictionary came from.
565 This is important for decent error message reporting because dictionaries
566 don't appear in the original source code. Doubtless this type will evolve...
570 = OccurrenceOf (TcIdOcc s) -- Occurrence of an overloaded identifier
571 | OccurrenceOfCon Id -- Occurrence of a data constructor
575 | DataDeclOrigin -- Typechecking a data declaration
577 | InstanceDeclOrigin -- Typechecking an instance decl
579 | LiteralOrigin HsLit -- Occurrence of a literal
581 | ArithSeqOrigin RenamedArithSeqInfo -- [x..], [x..y] etc
583 | SignatureOrigin -- A dict created from a type signature
585 | DoOrigin -- The monad for a do expression
587 | ClassDeclOrigin -- Manufactured during a class decl
590 -- | DerivingOrigin InstanceMapper
594 -- During "deriving" operations we have an ever changing
595 -- mapping of classes to instances, so we record it inside the
596 -- origin information. This is a bit of a hack, but it works
597 -- fine. (Simon is to blame [WDP].)
599 | InstanceSpecOrigin InstanceMapper
600 Class -- in a SPECIALIZE instance pragma
603 -- When specialising instances the instance info attached to
604 -- each class is not yet ready, so we record it inside the
605 -- origin information. This is a bit of a hack, but it works
606 -- fine. (Patrick is to blame [WDP].)
608 -- | DefaultDeclOrigin -- Related to a `default' declaration
610 | ValSpecOrigin Name -- in a SPECIALIZE pragma for a value
612 -- Argument or result of a ccall
613 -- Dictionaries with this origin aren't actually mentioned in the
614 -- translated term, and so need not be bound. Nor should they
615 -- be abstracted over.
617 | CCallOrigin String -- CCall label
618 (Maybe RenamedHsExpr) -- Nothing if it's the result
619 -- Just arg, for an argument
621 | LitLitOrigin String -- the litlit
623 | UnknownOrigin -- Help! I give up...
627 -- During deriving and instance specialisation operations
628 -- we can't get the instances of the class from inside the
629 -- class, because the latter ain't ready yet. Instead we
630 -- find a mapping from classes to envts inside the dict origin.
632 get_inst_env :: Class -> InstOrigin s -> ClassInstEnv
633 -- get_inst_env clas (DerivingOrigin inst_mapper _ _)
634 -- = fst (inst_mapper clas)
635 get_inst_env clas (InstanceSpecOrigin inst_mapper _ _)
636 = fst (inst_mapper clas)
637 get_inst_env clas other_orig = classInstEnv clas
640 pprOrigin :: String -> InstOrigin s -> SrcLoc -> Error
642 pprOrigin hdr orig locn
643 = addErrLoc locn hdr $ \ sty ->
646 hsep [ptext SLIT("at a use of an overloaded identifier:"), ppr sty id]
647 OccurrenceOfCon id ->
648 hsep [ptext SLIT("at a use of an overloaded constructor:"), ppr sty id]
649 InstanceDeclOrigin ->
650 ptext SLIT("in an instance declaration")
652 hsep [ptext SLIT("at an overloaded literal:"), ppr sty lit]
653 ArithSeqOrigin seq ->
654 hsep [ptext SLIT("at an arithmetic sequence:"), ppr sty seq]
656 ptext SLIT("in a type signature")
658 ptext SLIT("in a do statement")
660 ptext SLIT("in a class declaration")
661 InstanceSpecOrigin _ clas ty ->
662 hsep [text "in a SPECIALIZE instance pragma; class",
663 ppr sty clas, text "type:", ppr sty ty]
664 ValSpecOrigin name ->
665 hsep [ptext SLIT("in a SPECIALIZE user-pragma for"), ppr sty name]
666 CCallOrigin clabel Nothing{-ccall result-} ->
667 hsep [ptext SLIT("in the result of the _ccall_ to"), text clabel]
668 CCallOrigin clabel (Just arg_expr) ->
669 hsep [ptext SLIT("in an argument in the _ccall_ to"), text clabel <> comma, text "namely:", ppr sty arg_expr]
671 hcat [ptext SLIT("in this ``literal-literal'': "), text s]
673 ptext SLIT("in... oops -- I don't know where the overloading came from!")