Or even this??
-spec no_return(fun()) -> fun(()->no_return()).
no_return(F) -> F.
...
?MODULE:transaction(no_return(fun () -> my_funky_mnesia_test(A,B) end))
(Sorry, again untested. I'm only now discovering that dialyzer doesn't work
in Ubuntu because they stripped the debug_info out...)