greedy match search typechecks