There is a line in a Randall Jarrell poem about "the end of our good day." In immigration law, America seems to have come to the end of its good day.

It was not all good: nativists and know-nothings, race purists and snobs, all had their moment in the sun. Much of it was good, nonetheless. Immigrants of all kinds came, endured and conquered. Whatever the law said, America was theirs--ours--an immigrant nation on an immigrant continent.

Yet here we all stand at the end of that day, once but not future immigrants, shifting uneasily in the moral dusk.

For it must be dusk when Haitian dead wash up on our shores and Haitian living -- along with the Cubans and others--are held for a year or more in camps that remind us of nothing so much as the Japanese internment camps of 40 years ago.

At the very least we have lost our innocence. In the present administration, indeed, they have lost it with a vengeance. Orders out of the White House in the last few months have us patrolling the waters of a Caribbean dictatorship to keep its people in even as we open up old Army bases to detain those who have gotten out.

In all of this there are really two tragedies. There is the obvious tragedy of those who are turned away at our borders. But there is also the hidden tragedy of an American culture turning away from some of its fondest traditions.

No reform can bring back our innocence. Only borders open to all comers would dispel the moral ambiguity of our immigration policies. Any policy must turn some away. The only real questions are, whom shall we welcome and whom shall we turn back? Both the Reagan administration and Congress now have plans ready to answer these questions. In evaluating them we must remember that tragedies can teach us to live with realities that we would like to escape but cannot.

In immigration there are at least three such realities: the first of these is that we cannot have open borders. Our emotional and political resources (to say nothing of our material resources) are insufficient for any policy so radically generous. Americans, whoever their grandfathers, want no more "huddled masses yearning to breathe free."

But the second reality is that we cannot close all our borders either. Our most significant stretch of border runs up the Rio Grande and along the line from El Paso to Tijuana. It extends nearly 1,500 miles. It has no natural obstruction besides the summer heat. We would need an American Berlin Wall, and the equivalent of a Soviet army or two, to stem the human flow across it.

And the third reality is that our economy now has its own Rio Grande. We can achieve some control over access to concentrated industrial, agricultural and service work--in factories, in hotels, in universities. But we cannot effectively police the vast cash-and-carry economy of unskilled, unorganized, and often underpaid workers: waiters, gardeners, mechanics, migrants, maids and seamstresses, all working for cash and many without papers.

Tragedy teaches irony as well as resignation. In the midst of this very American tragedy of immigration we must remain alive to the ironies of reform. We would close our borders--but not all of them. We could control our economy--but not all of it. We are proud heirs of an immigrant tradition--but not proud enough to continue it amid new scarcities.

To ask that immigration law reconcile our past and future is to ask that it do the impossible. Pressed from all sides, the policy- makers can hardly ask that it do anything less. But our circumstances remain intractable and our ideals conflicted. The Reagan administration's reform proposals give a perfect example of this. There is a little something for everyone. A bracero program for those who want cheap labor; more border visas for those who want open borders; less mercy and less process for those who come illegally but an amnesty for those who came illegally before a certain date. To say it is a good or bad program is not the point. It is a cosmetic program, a facelift on the sagging features of so many past reforms.

The program that the Senate and House committees have put together does more and does it better. The penalties on employers may be stiff enough to deter the hiring of illegal aliens (al though that may mean stiff enough to impede the hiring of minorities). There is an artfully vague suggestion of forge-proof working papers. And the amnesty proposal is more generous than the president's. Perhaps most important, the due process rights of immigrants held for exclusion or deportation are somewhat better preserved than under the president's plan. Still it is a patchwork, a ragged cover for our tragedy.

The truth that we must accept, with irony as well as courage, is that we cannot entirely control immigration to the United States. There is poetic justice in this. The gods will not let us turn our backs on our own grandparents. This is not to say that policy-making--the assertion of control-- is futile. Only that it will be neither easy, nor comfortable, nor certain of success.