The late, great British writer Dennis Potter worked in long-form TV for a reason. Miniseries such as ''Pennies From Heaven'' (1978), ''The Singing Detective'' (1986), and ''Blackeyes'' (1989) gain strength from their length and from the absurdist flashbacks, fantasies, and musical numbers that assail their heroes. Filmmakers who boil these projects down to standard movie size do so at their peril, as Mike Nichols found out with the 1981 Steve Martin Hollywoodization of ''Pennies'' and as Keith Gordon discovers with the woefully small version of ''Detective'' that opens in area theaters today.
There are only two reasons to see the film, and the main one is Robert Downey Jr. As a bitter, hallucinating pulp mystery writer afflicted with a horrific case of psoriasis (as Potter himself was), the beleaguered actor is working at full steam for the first time in years, and his despair and the film's hospital setting reference Downey's real-life demons in ways both compelling and creepy.
Dan Dark has hit bottom when we first see him. His face and body a crusted quilt of sores, the writer is unable to move from his bed and is subject to humiliating full-body moisturizings by a plucky nurse (Katie Holmes) and general poking and prodding by doctors (including Alfre Woodard and Saul Rubinek), at whom he rails in impotent rage. Nor is he glad to see his wife (Robin Wright Penn), since he's convinced she's seeing other men and stealing his work.
There's nowhere to go but inside his own head, nothing to do but channel-surf his psyche. Scenes from Dark's novel ''The Singing Detective'' play out with the writer in the role of shamus and Adrien Brody and Jon Polito as bumbling thugs. Memories of his childhood spill out in which his mother (Carla Gugino) spirals downward after an affair with her husband's partner (Jeremy Northam).
Then there are the musical numbers -- typical Potter confections in which the cast lip-synchs to kitsch oldies as a way of illustrating the gulf between youthful hopes and nasty reality. While I'm always happy to hear ''Mr. Sandman,'' the fact remains that Gordon stages these interludes with shocking clumsiness.
All this cross-cutting paranoia leads Dark to the office of hospital psychiatrist Dr. Gibbon, who is played, in the movie's other pleasant surprise, by an unrecognizable Mel Gibson. Gibson, who also coproduced ''Detective,'' wears a bald wig and Coke-bottle glasses, but his performance is the real thing, sharp and conciliatory in just the right measure. Watching him and Downey play a game of word association is like being present at a high-stakes handball match.
The main problem with this short-form version of ''Detective'' is that once you remove Potter's endlessly rich digressions it starts looking like a disease-of-the-week therapy drama. Downey works like gangbusters to keep the film honest and tough, but he goes down fighting even as his character returns to life.
The question that has to be asked is: Why? The original six-part BBC ''Singing Detective'' remains one of the signal achievements in the history of television -- really -- and its release on DVD this past spring puts it easily within reach of the curious. True, Gordon is working from Potter's own adapted script (written in 1990; he died of cancer in 1994), but it's hard to shake the sense that the writer may simply have been trolling for a Hollywood paycheck. Throw in some early rock 'n' roll, give it a happy ending -- that'll play in America, won't it?