module Tst where
import HsIdent
import QualNames
import UniqueNames
import Ents
import HasBaseName
import TypedIds
{-
impenv ::
(HasBaseName n ib1,
Unique n,
QualNames qn m n1,
HasBaseName qn ib) =>
[(n1, Ent n)] -> [(HsIdentI (PN ib), TypedIds.IdTy (PN ib1))]
-}
impenv exprel =
[(origIdent (mkUnqual n) m i,origt m t)|(n,Ent m i t)<-exprel]
--`asTypeOf` (undefined::FiniteMap (HsIdentI qn) [(HsIdentI n,IdTy n)])
where
origt m = fmap (osub m)
osub m n = origName n m n
origIdent qn m = mapHsIdent (origName qn m)
origName qn m n = PN (getBaseName qn) (unique m n)