Thanks! Actually, if I understood well what you proposed, that's how I first tought of doing it, but with a [Maybe String] and only append whenever I actually had a (Just string), but as I said before, I don't think my teacher is gonna like that solution since it is not going to print when the interpreter finds the show instruction in the GCL code, it is gonna wait until it finishes
Also, nobody has told me why I shouldn't just use my original solution using unsafePerformIO, is it really bad? is it dangerous? why is it "unsafe"?
Well, writing to the standard output is certainly a side effect. (Thisdoes not mean that you cannot use unsafePerformIO. The compiler,
however, may assume that any value is free from side effects. This means
that you could get, in theory, less or more output from your program
than you want. In this sense it is not "safe".)