Skip to content

Instantly share code, notes, and snippets.

@mrb
Created April 12, 2014 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrb/10560648 to your computer and use it in GitHub Desktop.
Save mrb/10560648 to your computer and use it in GitHub Desktop.
OCaml Spelling
let prog =
CompoundStm(AssignStm("a", OpzExp(NumExp 5, Plus, NumExp 3)),
CompoundStm(AssignStm("b",
EseqExp(PrintStm[IdExp("a"), OpExp(IdExp("a"), Minus, NumExp 1)],
OpExp(NumExp 10, Times, IdExp("a")))),
PrintStm[IdExp("b")]));;
Error: The variant type exp has no constructor OpzExp
Did you mean OpExp?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment