learn-ocaml
learn-ocaml copied to clipboard
Access to rec_flag in Test_lib.find_binding
We often want to look at the AST for a certain function to check if the student has implemented the function using recursion, by checking for the rec
flag. Unfortunately, Test_lib.find_binding
does not give us the top-level Pexp_let
expression, so we do not have access to the rec_flag
field used for the actual top-level binding. We have our own version of find_binding
that we copy-paste into all of our graders that is copied from Test_lib.find_binding
and additionally provides the rec_flag
field to the grading function. It would be nice if this functionality could be added to the Test_lib
version, although changing the signature would break a lot of existing graders...