harp: more informative error message for function misspecification