Schema-guided inductive functional programming through automatic detection of type morphisms