British Prime Minister Margaret Thatcher made history this week with her visit to Poland, where she gave the government some excellent advice.

But the advice is falling on deaf ears. Consequently, the visit seems likely to accomplish little beyond the precedent set with the first tour of Poland by a British premier.The advice amounted only to the truism that Poland can't solve its problems as long as the government tries to run the economy. Though Prime Minister Mieczyslaw Rakowski responded that Poland will start moving toward a Western-style market economy next year, his words don't match his deeds.

That's because it's hard to see how Poland's economy can be reformed without the willing cooperation of the banned Solidarity trade union. Yet the Polish government keeps going out of its way to antagonize Solidarity.

Just before Mrs. Thatcher's visit, the Polish government announced that on Dec. 1 it will close the Lenin Shipyard at Gdansk, the historic facility on the Baltic Sea that is the birthplace and stronghold of Solidarity, the communist bloc's first free trade union, and a powerful symbol of workers' resentment against orders from the Warsaw regime.

Yes, the Lenin Shipyard loses money. So do most large plants under government management in Poland. But it loses less money and operates more efficiently than the nearby Paris Commune Shipyard, which is not synonymous with trade unionism and is to remain open.

By choosing the Lenin Shipyard from a list of 150 money-losing government enterprises as the first to be closed, Warsaw sent a pointed message. The message is that the regime is trying to humiliate Solidarity, has no intention of legalizing it again, and doesn't mind provoking a strike or putting it down by force.

Under the circumstances, someone needs to tell Warsaw what Mrs. Thatcher was too polite to say: Poland won't get out of the woods until the regime realizes that its economic policies are far more bankrupt than the country's shipyards.