--- A useful function that takes an occurrence of a global thing
--- and instantiates its type with fresh type variables
-tcGlobalOcc :: Name
- -> NF_TcM s (Id, -- The Id
- [TcType s], -- Instance types
- TcType s) -- Rest of its type
-
-tcGlobalOcc name
- = tcLookupGlobalValue name `thenNF_Tc` \ id ->
- let
- (tyvars, rho) = splitForAllTy (idType id)
- in
- tcInstTyVars tyvars `thenNF_Tc` \ (tyvars', arg_tys, tenv) ->
- tcInstType tenv rho `thenNF_Tc` \ rho' ->
- returnNF_Tc (id, arg_tys, rho')
-
-