tidyNameOcc :: TidyEnv -> Name -> Name
-- In rules and instances, we have Names, and we must tidy them too
-- Fortunately, we can lookup in the VarEnv with a name
tidyNameOcc (_, var_env) n = case lookupUFM var_env n of
                                Nothing -> n
                                Just v  -> idName v
tidyNameOcc :: TidyEnv -> Name -> Name
tidyNameOcc (_, var_env) n = case lookupUFM var_env n of
                                Nothing -> n
                                Just v  -> idName v
tidyNameOcc (_, var_env) n = case lookupUFM var_env n of
                                Nothing -> n
                                Just v  -> idName v