I’m preparing a list of dialect of ML that could be gives as an exercise to student for implementation. (The current plan is to give a typechecker for miniML, and they will implement an extension + interpreter).
I’m collecting a list of possible extensions of miniML that could fit here. I can’t remember all possible extensions, could you help?
(If you think that an extension is too complicated to implement, I wish you to mention it anyway).
Compiling pattern-matching is non-trivial and interesting; you could ask them to translate deep pattern matching into just shallow pattern matches (all subpatterns are variables or wildcards) before interpretation.
Easier than GADTs, existential types. (Not much to do on the interpreter side.)
One extension that is easier than delim/cc or effect handlers is to support angelic non-determinism with choice : 'a list -> 'a (choice [] is a failure).
Back in the day, I really enjoyed writing a Prolog interpreter using @ddr 's call/cc hack in caml-light. Boy howdy that was fun. I think that might make a nice exercise for your students, once they implement call/cc and use that to implement shift/reset.
Thanks for an idea about call/cc and delim/cc but here I’m currently looking for miniML extensions. I have other topics about language implementation, which include Scheme+call/cc, Scheme+delim/cc, BQN, etc.
I thought about this, but I think it is too comlicated. I have troubles understanding 1ML paper. Despite it should look simlier than OCaml modules, it looks like more bizzare. Also, It seems that it need System-F in type system. Maybe, I should invent a task that should “upgrade” HM type inference to non-prenex System-F one?.. I’m not sure… Looks complicated.
Thanks for your ideas, but in this thread I’m looking for langugage extensions. I will write down your ideas in another list of tasks