When Robert Burns called the Scottish parliamentarians who ratified the Treaty of Union of 1707 "a parcel of rogues in a nation", he could hardly have envisaged a bunch as venal as those depicted in Tim Barrow's new play, Union.

From the Duke of Queensberry (a drunken, whoring vulgarian) to the Earl of Stair ("the Butcher of Glencoe"), the politicians of the early 18th century, as portrayed by Barrow, make our current crop look like saints.

The Scottish parliament's allegiance to the new United Kingdom of Great Britain is far from the only oath being sworn in the drama. The Lyceum company surely hasn't presented language this profane, or sexuality this bawdy, since the staging in 2002 of Howard Barker's superb drama Victory (a vivid reimagining of the Restoration of the English monarchy in 1660).

The ambition of Barrow's play is admirable. Shifting back and forth between a dodgy Edinburgh drinking hole (anonymous enough, think Queensberry & Co, to conduct their shenanigans) and Kensington Palace (where a tormented Queen Anne takes a bankrupt Caledonia to her childless bosom), its scope is positively Barkerian.

The resemblance to a Barker play breaks down, however, in Union's lumbering, almost three-hour structure and the unsubtle metaphorical parallel drawn between the fates of two Edinburgh prostitutes and Scotland itself. The dramaturgical difficulties are not assisted by director Mark Thomson's uneven casting. Liam Brennan, for instance, makes a brilliant monster of Queensberry. However, one wonders about the wisdom of foisting the significant role of Jacobite poet Allan Ramsay upon the undergraduate shoulders of young Josh Whitelaw.

Praise is due to both the Lyceum and Barrow for a courageous piece of pre-referendum theatre. However, like the Treaty of Union itself perhaps, it should be remembered as a frustrating combination of success and failure.