cs3110 / textbook

The CS 3110 Textbook, "OCaml Programming: Correct + Efficient + Beautiful"
Other
720 stars 132 forks source link

Code does not compile on page /chapters/interp/substitution.html #93

Closed Luv2C0d3 closed 2 years ago

Luv2C0d3 commented 2 years ago

At stage https://cs3110.github.io/textbook/chapters/interp/substitution.html#implementing-the-single-step-relation

The original problem seems to be around subst not using arguments, which causes the compilation to fail:

let subst e v x =
  failwith "See next section"

The error I get:

15 | let subst e v x =
                   ^
Error (warning 27 [unused-var-strict]): unused variable x.

I am too new to know exactly how to fix it, so I commented out subst and a call to subst from let(x, e1, e2) and things compile. Not sure whether things will work though.