2 % (c) The GRASP/AQUA Project, Glasgow University, 1993-1998
5 \section[MkIface]{Print an interface for a module}
10 pprModDetails, pprIface, pprUsage,
14 #include "HsVersions.h"
17 import HsCore ( HsIdInfo(..), UfExpr(..), toUfExpr, toUfBndr )
18 import HsTypes ( toHsTyVars )
19 import TysPrim ( alphaTyVars )
20 import BasicTypes ( Fixity(..), NewOrData(..), Activation(..),
21 Version, initialVersion, bumpVersion
23 import NewDemand ( isTopSig )
25 import RnHsSyn ( RenamedInstDecl, RenamedTyClDecl )
26 import HscTypes ( VersionInfo(..), ModIface(..), ModDetails(..),
27 ModuleLocation(..), GhciMode(..),
28 IfaceDecls, mkIfaceDecls, dcl_tycl, dcl_rules, dcl_insts,
29 TyThing(..), DFunId, Avails, TypeEnv,
30 WhatsImported(..), GenAvailInfo(..),
31 ImportVersion, AvailInfo, Deprecations(..),
32 lookupVersion, typeEnvIds
36 import Id ( idType, idInfo, isImplicitId, idCgInfo,
39 import DataCon ( dataConId, dataConSig, dataConFieldLabels, dataConStrictMarks )
42 import CoreSyn ( CoreRule(..), IdCoreRule )
43 import CoreFVs ( ruleLhsFreeNames )
44 import CoreUnfold ( neverUnfold, unfoldingTemplate )
45 import PprCore ( pprIdCoreRule )
46 import Name ( getName, nameModule, toRdrName, isGlobalName,
47 nameIsLocalOrFrom, Name, NamedThing(..) )
50 import OccName ( pprOccName )
51 import TyCon ( TyCon, getSynTyConDefn, isSynTyCon, isNewTyCon,
52 isAlgTyCon, tyConGenIds, tyConTheta, tyConTyVars,
53 tyConDataCons, tyConFamilySize, isPrimTyCon,
54 isClassTyCon, isForeignTyCon, tyConArity
56 import Class ( classExtraBigSig, classTyCon, DefMeth(..) )
57 import FieldLabel ( fieldLabelType )
58 import TcType ( tcSplitSigmaTy, tidyTopType, deNoteType, namesOfDFunHead )
59 import SrcLoc ( noSrcLoc )
61 import Module ( ModuleName )
62 import Util ( sortLt, dropList )
63 import ErrUtils ( dumpIfSet_dyn )
66 import Maybe ( catMaybes )
67 import IO ( IOMode(..), openFile, hClose )
71 %************************************************************************
73 \subsection{Completing an interface}
75 %************************************************************************
81 mkFinalIface :: GhciMode
84 -> Maybe ModIface -- The old interface, if we have it
85 -> ModIface -- The new one, minus the decls and versions
86 -> ModDetails -- The ModDetails for this module
87 -> IO ModIface -- The new one, complete with decls and versions
89 -- a) completes the interface
90 -- b) writes it out to a file if necessary
92 mkFinalIface ghci_mode dflags location maybe_old_iface
93 new_iface@ModIface{ mi_module=mod }
94 new_details@ModDetails{ md_insts=insts,
98 -- Add the new declarations, and the is-orphan flag
99 let iface_w_decls = new_iface { mi_decls = new_decls,
100 mi_orphan = orphan_mod }
102 -- Add version information
103 ; let (final_iface, maybe_diffs) = _scc_ "versioninfo" addVersionInfo maybe_old_iface iface_w_decls
105 -- Write the interface file, if necessary
106 ; when (must_write_hi_file maybe_diffs)
107 (writeIface hi_file_path final_iface)
110 ; write_diffs dflags final_iface maybe_diffs
116 must_write_hi_file Nothing = False
117 must_write_hi_file (Just _diffs) = ghci_mode /= Interactive
118 -- We must write a new .hi file if there are some changes
119 -- and we're not in interactive mode
120 -- maybe_diffs = 'Nothing' means that even the usages havn't changed,
121 -- so there's no need to write a new interface file. But even if
122 -- the usages have changed, the module version may not have.
124 hi_file_path = ml_hi_file location
125 new_decls = mkIfaceDecls ty_cls_dcls rule_dcls inst_dcls
126 inst_dcls = map ifaceInstance insts
127 ty_cls_dcls = foldNameEnv ifaceTyThing_acc [] types
128 rule_dcls = map ifaceRule rules
129 orphan_mod = isOrphanModule mod new_details
131 write_diffs :: DynFlags -> ModIface -> Maybe SDoc -> IO ()
132 write_diffs dflags new_iface Nothing
133 = do when (dopt Opt_D_dump_hi_diffs dflags) (printDump (text "INTERFACE UNCHANGED"))
134 dumpIfSet_dyn dflags Opt_D_dump_hi "UNCHANGED FINAL INTERFACE" (pprIface new_iface)
136 write_diffs dflags new_iface (Just sdoc_diffs)
137 = do dumpIfSet_dyn dflags Opt_D_dump_hi_diffs "INTERFACE HAS CHANGED" sdoc_diffs
138 dumpIfSet_dyn dflags Opt_D_dump_hi "NEW FINAL INTERFACE" (pprIface new_iface)
142 isOrphanModule :: Module -> ModDetails -> Bool
143 isOrphanModule this_mod (ModDetails {md_insts = insts, md_rules = rules})
144 = any orphan_inst insts || any orphan_rule rules
146 orphan_inst dfun_id = no_locals (namesOfDFunHead (idType dfun_id))
147 orphan_rule rule = no_locals (ruleLhsFreeNames rule)
148 no_locals names = isEmptyNameSet (filterNameSet (nameIsLocalOrFrom this_mod) names)
151 Implicit Ids and class tycons aren't included in interface files, so
152 we miss them out of the accumulating parameter here.
155 ifaceTyThing_acc :: TyThing -> [RenamedTyClDecl] -> [RenamedTyClDecl]
156 ifaceTyThing_acc (AnId id) so_far | isImplicitId id = so_far
157 ifaceTyThing_acc (ATyCon id) so_far | isClassTyCon id = so_far
158 ifaceTyThing_acc other so_far = ifaceTyThing other : so_far
161 Convert *any* TyThing into a RenamedTyClDecl. Used both for
162 generating interface files and for the ':info' command in GHCi.
165 ifaceTyThing :: TyThing -> RenamedTyClDecl
166 ifaceTyThing (AClass clas) = cls_decl
168 cls_decl = ClassDecl { tcdCtxt = toHsContext sc_theta,
169 tcdName = getName clas,
170 tcdTyVars = toHsTyVars clas_tyvars,
171 tcdFDs = toHsFDs clas_fds,
172 tcdSigs = map toClassOpSig op_stuff,
174 tcdSysNames = sys_names,
177 (clas_tyvars, clas_fds, sc_theta, sc_sels, op_stuff) = classExtraBigSig clas
178 tycon = classTyCon clas
179 data_con = head (tyConDataCons tycon)
180 sys_names = mkClassDeclSysNames (getName tycon, getName data_con,
181 getName (dataConId data_con), map getName sc_sels)
183 toClassOpSig (sel_id, def_meth)
184 = ASSERT(sel_tyvars == clas_tyvars)
185 ClassOpSig (getName sel_id) def_meth' (toHsType op_ty) noSrcLoc
187 (sel_tyvars, _, op_ty) = tcSplitSigmaTy (idType sel_id)
188 def_meth' = case def_meth of
189 NoDefMeth -> NoDefMeth
190 GenDefMeth -> GenDefMeth
191 DefMeth id -> DefMeth (getName id)
193 ifaceTyThing (ATyCon tycon) = ty_decl
195 ty_decl | isSynTyCon tycon
196 = TySynonym { tcdName = getName tycon,
197 tcdTyVars = toHsTyVars tyvars,
198 tcdSynRhs = toHsType syn_ty,
202 = TyData { tcdND = new_or_data,
203 tcdCtxt = toHsContext (tyConTheta tycon),
204 tcdName = getName tycon,
205 tcdTyVars = toHsTyVars tyvars,
206 tcdCons = map ifaceConDecl (tyConDataCons tycon),
207 tcdNCons = tyConFamilySize tycon,
209 tcdSysNames = map getName (tyConGenIds tycon),
212 | isForeignTyCon tycon
213 = ForeignType { tcdName = getName tycon,
214 tcdExtName = Nothing,
215 tcdFoType = DNType, -- The only case at present
219 -- needed in GHCi for ':info Int#', for example
220 = TyData { tcdND = DataType,
222 tcdName = getName tycon,
223 tcdTyVars = toHsTyVars (take (tyConArity tycon) alphaTyVars),
230 | otherwise = pprPanic "ifaceTyThing" (ppr tycon)
232 tyvars = tyConTyVars tycon
233 (_, syn_ty) = getSynTyConDefn tycon
234 new_or_data | isNewTyCon tycon = NewType
235 | otherwise = DataType
237 ifaceConDecl data_con
238 = ConDecl (getName data_con) (getName (dataConId data_con))
239 (toHsTyVars ex_tyvars)
240 (toHsContext ex_theta)
243 (tyvars1, _, ex_tyvars, ex_theta, arg_tys, tycon1) = dataConSig data_con
244 field_labels = dataConFieldLabels data_con
245 strict_marks = dropList ex_theta (dataConStrictMarks data_con)
246 -- The 'drop' is because dataConStrictMarks
247 -- includes the existential dictionaries
248 details | null field_labels
249 = ASSERT( tycon == tycon1 && tyvars == tyvars1 )
250 VanillaCon (zipWith BangType strict_marks (map toHsType arg_tys))
253 = RecCon (zipWith mk_field strict_marks field_labels)
255 mk_field strict_mark field_label
256 = ([getName field_label], BangType strict_mark (toHsType (fieldLabelType field_label)))
258 ifaceTyThing (AnId id) = iface_sig
260 iface_sig = IfaceSig { tcdName = getName id,
261 tcdType = toHsType id_type,
262 tcdIdInfo = hs_idinfo,
267 cg_info = idCgInfo id
268 arity_info = arityInfo id_info
269 caf_info = cgCafInfo cg_info
271 hs_idinfo | opt_OmitInterfacePragmas
274 = catMaybes [arity_hsinfo, caf_hsinfo,
275 strict_hsinfo, wrkr_hsinfo,
278 ------------ Arity --------------
279 arity_hsinfo | arity_info == 0 = Nothing
280 | otherwise = Just (HsArity arity_info)
282 ------------ Caf Info --------------
283 caf_hsinfo = case caf_info of
284 NoCafRefs -> Just HsNoCafRefs
287 ------------ Strictness --------------
288 -- No point in explicitly exporting TopSig
289 strict_hsinfo = case newStrictnessInfo id_info of
290 Just sig | not (isTopSig sig) -> Just (HsStrictness sig)
293 ------------ Worker --------------
294 work_info = workerInfo id_info
295 has_worker = case work_info of { HasWorker _ _ -> True; other -> False }
296 wrkr_hsinfo = case work_info of
297 HasWorker work_id wrap_arity ->
298 Just (HsWorker (getName work_id) wrap_arity)
301 ------------ Unfolding --------------
302 -- The unfolding is redundant if there is a worker
303 unfold_info = unfoldingInfo id_info
304 inline_prag = inlinePragInfo id_info
305 rhs = unfoldingTemplate unfold_info
306 unfold_hsinfo | neverUnfold unfold_info
307 || has_worker = Nothing
308 | otherwise = Just (HsUnfold inline_prag (toUfExpr rhs))
312 ifaceInstance :: DFunId -> RenamedInstDecl
313 ifaceInstance dfun_id
314 = InstDecl (toHsType tidy_ty) EmptyMonoBinds [] (Just (getName dfun_id)) noSrcLoc
316 tidy_ty = tidyTopType (deNoteType (idType dfun_id))
317 -- The deNoteType is very important. It removes all type
318 -- synonyms from the instance type in interface files.
319 -- That in turn makes sure that when reading in instance decls
320 -- from interface files that the 'gating' mechanism works properly.
321 -- Otherwise you could have
322 -- type Tibble = T Int
323 -- instance Foo Tibble where ...
324 -- and this instance decl wouldn't get imported into a module
325 -- that mentioned T but not Tibble.
327 ifaceRule :: IdCoreRule -> RuleDecl Name pat
328 ifaceRule (id, BuiltinRule _ _)
329 = pprTrace "toHsRule: builtin" (ppr id) (bogusIfaceRule id)
331 ifaceRule (id, Rule name act bndrs args rhs)
332 = IfaceRule name act (map toUfBndr bndrs) (getName id)
333 (map toUfExpr args) (toUfExpr rhs) noSrcLoc
335 bogusIfaceRule :: (NamedThing a) => a -> RuleDecl Name pat
337 = IfaceRule SLIT("bogus") NeverActive [] (getName id) [] (UfVar (getName id)) noSrcLoc
341 %************************************************************************
343 \subsection{Checking if the new interface is up to date
345 %************************************************************************
348 addVersionInfo :: Maybe ModIface -- The old interface, read from M.hi
349 -> ModIface -- The new interface decls
350 -> (ModIface, Maybe SDoc) -- Nothing => no change; no need to write new Iface
351 -- Just mi => Here is the new interface to write
352 -- with correct version numbers
354 -- NB: the fixities, declarations, rules are all assumed
355 -- to be sorted by increasing order of hsDeclName, so that
356 -- we can compare for equality
358 addVersionInfo Nothing new_iface
359 -- No old interface, so definitely write a new one!
360 = (new_iface, Just (text "No old interface available"))
362 addVersionInfo (Just old_iface@(ModIface { mi_version = old_version,
363 mi_decls = old_decls,
364 mi_fixities = old_fixities,
365 mi_deprecs = old_deprecs }))
366 new_iface@(ModIface { mi_decls = new_decls,
367 mi_fixities = new_fixities,
368 mi_deprecs = new_deprecs })
370 | no_output_change && no_usage_change
371 = (new_iface, Nothing)
372 -- don't return the old iface because it may not have an
373 -- mi_globals field set to anything reasonable.
375 | otherwise -- Add updated version numbers
376 = --pprTrace "completeIface" (ppr (dcl_tycl old_decls))
377 (final_iface, Just pp_diffs)
380 final_iface = new_iface { mi_version = new_version }
381 old_mod_vers = vers_module old_version
382 new_version = VersionInfo { vers_module = bumpVersion no_output_change old_mod_vers,
383 vers_exports = bumpVersion no_export_change (vers_exports old_version),
384 vers_rules = bumpVersion no_rule_change (vers_rules old_version),
385 vers_decls = tc_vers }
387 no_output_change = no_tc_change && no_rule_change && no_export_change && no_deprec_change
388 no_usage_change = mi_usages old_iface == mi_usages new_iface
390 no_export_change = mi_exports old_iface == mi_exports new_iface -- Kept sorted
391 no_rule_change = dcl_rules old_decls == dcl_rules new_decls -- Ditto
392 no_deprec_change = old_deprecs == new_deprecs
394 -- Fill in the version number on the new declarations by looking at the old declarations.
395 -- Set the flag if anything changes.
396 -- Assumes that the decls are sorted by hsDeclName.
397 (no_tc_change, pp_tc_diffs, tc_vers) = diffDecls old_version old_fixities new_fixities
398 (dcl_tycl old_decls) (dcl_tycl new_decls)
399 pp_diffs = vcat [pp_tc_diffs,
400 pp_change no_export_change "Export list",
401 pp_change no_rule_change "Rules",
402 pp_change no_deprec_change "Deprecations",
403 pp_change no_usage_change "Usages"]
404 pp_change True what = empty
405 pp_change False what = text what <+> ptext SLIT("changed")
407 diffDecls :: VersionInfo -- Old version
408 -> NameEnv Fixity -> NameEnv Fixity -- Old and new fixities
409 -> [RenamedTyClDecl] -> [RenamedTyClDecl] -- Old and new decls
410 -> (Bool, -- True <=> no change
411 SDoc, -- Record of differences
412 NameEnv Version) -- New version map
414 diffDecls (VersionInfo { vers_module = old_mod_vers, vers_decls = old_decls_vers })
415 old_fixities new_fixities old new
416 = diff True empty emptyNameEnv old new
418 -- When seeing if two decls are the same,
419 -- remember to check whether any relevant fixity has changed
420 eq_tc d1 d2 = d1 == d2 && all (same_fixity . fst) (tyClDeclNames d1)
421 same_fixity n = lookupNameEnv old_fixities n == lookupNameEnv new_fixities n
423 diff ok_so_far pp new_vers [] [] = (ok_so_far, pp, new_vers)
424 diff ok_so_far pp new_vers (od:ods) [] = diff False (pp $$ only_old od) new_vers ods []
425 diff ok_so_far pp new_vers [] (nd:nds) = diff False (pp $$ only_new nd) new_vers_with_new [] nds
427 new_vers_with_new = extendNameEnv new_vers (tyClDeclName nd) (bumpVersion False old_mod_vers)
428 -- When adding a new item, start from the old module version
429 -- This way, if you have version 4 of f, then delete f, then add f again,
430 -- you'll get version 6 of f, which will (correctly) force recompilation of
433 diff ok_so_far pp new_vers (od:ods) (nd:nds)
434 = case od_name `compare` nd_name of
435 LT -> diff False (pp $$ only_old od) new_vers ods (nd:nds)
436 GT -> diff False (pp $$ only_new nd) new_vers (od:ods) nds
437 EQ | od `eq_tc` nd -> diff ok_so_far pp new_vers ods nds
438 | otherwise -> diff False (pp $$ changed od nd) new_vers_with_diff ods nds
440 od_name = tyClDeclName od
441 nd_name = tyClDeclName nd
442 new_vers_with_diff = extendNameEnv new_vers nd_name (bumpVersion False old_version)
443 old_version = lookupVersion old_decls_vers od_name
445 only_old d = ptext SLIT("Only in old iface:") <+> ppr d
446 only_new d = ptext SLIT("Only in new iface:") <+> ppr d
447 changed od nd = ptext SLIT("Changed in iface: ") <+> ((ptext SLIT("Old:") <+> ppr od) $$
448 (ptext SLIT("New:") <+> ppr nd))
453 %************************************************************************
455 \subsection{Writing ModDetails}
457 %************************************************************************
460 pprModDetails :: ModDetails -> SDoc
461 pprModDetails (ModDetails { md_types = type_env, md_insts = dfun_ids, md_rules = rules })
462 = vcat [ dump_types dfun_ids type_env
463 , dump_insts dfun_ids
466 dump_types :: [Var] -> TypeEnv -> SDoc
467 dump_types dfun_ids type_env
468 = text "TYPE SIGNATURES" $$ nest 4 (dump_sigs ids)
470 ids = [id | id <- typeEnvIds type_env, want_sig id]
471 want_sig id | opt_PprStyle_Debug = True
472 | otherwise = isLocalId id &&
473 isGlobalName (idName id) &&
474 not (id `elem` dfun_ids)
475 -- isLocalId ignores data constructors, records selectors etc
476 -- The isGlobalName ignores local dictionary and method bindings
477 -- that the type checker has invented. User-defined things have
480 dump_insts :: [Var] -> SDoc
481 dump_insts [] = empty
482 dump_insts dfun_ids = text "INSTANCES" $$ nest 4 (dump_sigs dfun_ids)
484 dump_sigs :: [Var] -> SDoc
486 -- Print type signatures
487 -- Convert to HsType so that we get source-language style printing
488 -- And sort by RdrName
489 = vcat $ map ppr_sig $ sortLt lt_sig $
490 [ (toRdrName id, toHsType (idType id))
493 lt_sig (n1,_) (n2,_) = n1 < n2
494 ppr_sig (n,t) = ppr n <+> dcolon <+> ppr t
496 dump_rules :: [IdCoreRule] -> SDoc
497 dump_rules [] = empty
498 dump_rules rs = vcat [ptext SLIT("{-# RULES"),
499 nest 4 (vcat (map pprIdCoreRule rs)),
504 %************************************************************************
506 \subsection{Writing an interface file}
508 %************************************************************************
511 writeIface :: FilePath -> ModIface -> IO ()
512 writeIface hi_path mod_iface
513 = do { if_hdl <- openFile hi_path WriteMode
514 ; printForIface if_hdl from_this_mod (pprIface mod_iface)
518 -- Print names unqualified if they are from this module
519 from_this_mod n = nameModule n == this_mod
520 this_mod = mi_module mod_iface
522 pprIface :: ModIface -> SDoc
524 = vcat [ ptext SLIT("__interface")
525 <+> doubleQuotes (ptext opt_InPackage)
526 <+> ppr (mi_module iface) <+> ppr (vers_module version_info)
528 <+> (if mi_orphan iface then char '!' else empty)
529 <+> int opt_HiVersion
530 <+> ptext SLIT("where")
532 , vcat (map pprExport (mi_exports iface))
533 , vcat (map pprUsage (mi_usages iface))
535 , pprFixities (mi_fixities iface) (dcl_tycl decls)
536 , pprIfaceDecls (vers_decls version_info) decls
537 , pprRulesAndDeprecs (dcl_rules decls) (mi_deprecs iface)
540 version_info = mi_version iface
541 decls = mi_decls iface
542 exp_vers = vers_exports version_info
543 rule_vers = vers_rules version_info
545 pp_sub_vers | exp_vers == initialVersion && rule_vers == initialVersion = empty
546 | otherwise = brackets (ppr exp_vers <+> ppr rule_vers)
549 When printing export lists, we print like this:
551 AvailTC C [C, x, y] C(x,y)
552 AvailTC C [x, y] C!(x,y) -- Exporting x, y but not C
555 pprExport :: (ModuleName, Avails) -> SDoc
556 pprExport (mod, items)
557 = hsep [ ptext SLIT("__export "), ppr mod, hsep (map pp_avail items) ] <> semi
559 pp_avail :: AvailInfo -> SDoc
560 pp_avail (Avail name) = pprOcc name
561 pp_avail (AvailTC _ []) = empty
562 pp_avail (AvailTC n (n':ns)) | n==n' = pprOcc n <> pp_export ns
563 | otherwise = pprOcc n <> char '|' <> pp_export (n':ns)
566 pp_export names = braces (hsep (map pprOcc names))
568 pprOcc :: Name -> SDoc -- Print the occurrence name only
569 pprOcc n = pprOccName (nameOccName n)
574 pprUsage :: ImportVersion Name -> SDoc
575 pprUsage (m, has_orphans, is_boot, whats_imported)
576 = hsep [ptext SLIT("import"), ppr m,
578 pp_versions whats_imported
581 pp_orphan | has_orphans = char '!'
583 pp_boot | is_boot = char '@'
586 -- Importing the whole module is indicated by an empty list
587 pp_versions NothingAtAll = empty
588 pp_versions (Everything v) = dcolon <+> int v
589 pp_versions (Specifically vm ve nvs vr) = dcolon <+> int vm <+> pp_export_version ve <+> int vr
590 <+> hsep [ pprOcc n <+> int v | (n,v) <- nvs ]
592 pp_export_version Nothing = empty
593 pp_export_version (Just v) = int v
597 pprIfaceDecls :: NameEnv Int -> IfaceDecls -> SDoc
598 pprIfaceDecls version_map decls
599 = vcat [ vcat [ppr i <+> semi | i <- dcl_insts decls]
600 , vcat (map ppr_decl (dcl_tycl decls))
603 ppr_decl d = ppr_vers d <+> ppr d <> semi
605 -- Print the version for the decl
606 ppr_vers d = case lookupNameEnv version_map (tyClDeclName d) of
612 pprFixities :: (Outputable a)
614 -> [TyClDecl Name pat]
616 pprFixities fixity_map decls
617 = hsep [ ppr fix <+> ppr n
619 (n,_) <- tyClDeclNames d,
620 Just fix <- [lookupNameEnv fixity_map n]] <> semi
622 -- Disgusting to print these two together, but that's
623 -- the way the interface parser currently expects them.
624 pprRulesAndDeprecs :: (Outputable a) => [a] -> Deprecations -> SDoc
625 pprRulesAndDeprecs [] NoDeprecs = empty
626 pprRulesAndDeprecs rules deprecs
627 = ptext SLIT("{-##") <+> (pp_rules rules $$ pp_deprecs deprecs) <+> ptext SLIT("##-}")
630 pp_rules rules = ptext SLIT("__R") <+> vcat (map ppr rules)
632 pp_deprecs NoDeprecs = empty
633 pp_deprecs deprecs = ptext SLIT("__D") <+> guts
635 guts = case deprecs of
636 DeprecAll txt -> doubleQuotes (ptext txt)
637 DeprecSome env -> ppr_deprec_env env
639 ppr_deprec_env :: NameEnv (Name, FAST_STRING) -> SDoc
640 ppr_deprec_env env = vcat (punctuate semi (map pp_deprec (nameEnvElts env)))
642 pp_deprec (name, txt) = pprOcc name <+> doubleQuotes (ptext txt)