X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FVar.lhs;h=ec83494bb2571988ae47f8bc5f0f6f23a76f964e;hb=679a7c41949c438c0a6ace92b0334bb795690738;hp=010fb1ec26124bc27e040531095f9da4d5cc697b;hpb=6f8f947cfc93a136a3b636017072bd3664b87b9e;p=ghc-hetmet.git diff --git a/compiler/basicTypes/Var.lhs b/compiler/basicTypes/Var.lhs index 010fb1e..ec83494 100644 --- a/compiler/basicTypes/Var.lhs +++ b/compiler/basicTypes/Var.lhs @@ -17,13 +17,19 @@ -- -- * 'Id.Id': see "Id#name_types" -- --- * 'Var.Var' is a synonym for the 'Id.Id' type but it may additionally potentially contain type variables, --- which have a 'TypeRep.Kind' rather than a 'TypeRep.Type' and only contain some extra details during typechecking. +-- * 'Var.Var' is a synonym for the 'Id.Id' type but it may additionally +-- potentially contain type variables, which have a 'TypeRep.Kind' +-- rather than a 'TypeRep.Type' and only contain some extra +-- details during typechecking. +-- -- These 'Var.Var' names may either be global or local, see "Var#globalvslocal" -- -- #globalvslocal# --- Global 'Id's and 'Var's are those that are imported or correspond to a data constructor, primitive operation, or record selectors. --- Local 'Id's and 'Var's are those bound within an expression (e.g. by a lambda) or at the top level of the module being compiled. +-- Global 'Id's and 'Var's are those that are imported or correspond +-- to a data constructor, primitive operation, or record selectors. +-- Local 'Id's and 'Var's are those bound within an expression +-- (e.g. by a lambda) or at the top level of the module being compiled. + module Var ( -- * The main data type and synonyms Var, TyVar, CoVar, Id, DictId, DFunId, EvVar, EvId, IpId, @@ -50,7 +56,7 @@ module Var ( mkTyVar, mkTcTyVar, mkWildCoVar, -- ** Taking 'TyVar's apart - tyVarName, tyVarKind, tcTyVarDetails, + tyVarName, tyVarKind, tcTyVarDetails, setTcTyVarDetails, -- ** Modifying 'TyVar's setTyVarName, setTyVarUnique, setTyVarKind, @@ -283,6 +289,9 @@ mkTcTyVar name kind details tcTyVarDetails :: TyVar -> TcTyVarDetails tcTyVarDetails (TcTyVar { tc_tv_details = details }) = details tcTyVarDetails var = pprPanic "tcTyVarDetails" (ppr var) + +setTcTyVarDetails :: TyVar -> TcTyVarDetails -> TyVar +setTcTyVarDetails tv details = tv { tc_tv_details = details } \end{code} %************************************************************************