I am currently working on a homework for a lecture in which I have to write a Interpreter for a language we defined in the lecture. Part of my homework is to write a function that will take an expression from my datatype and turn it into a string.
Here is my datatype so far:
datatype basicType = voidType | intType | boolType; datatype etype = basicType | tupelType of (etype * etype) | functionType of etype -> basicType;
Note that I am not even sure that this datatype is correct. I am allowed to use the SML functions String.concatWith and Int.toString.
Since this is a homework I should do I like to only get a start and tips and tricks. No full blown solutions please.
I am thankfull for any input from you girls/guys since I am about to lose my sanity from this lecture.