pub fn eval_with_callback<F: Fn(Error, Rule)>(
    rules: &[Rule],
    input: &Input,
    output: &mut Output,
    on_type_error: Option<F>
)