29 Apr
2003
29 Apr
'03
1:34 p.m.
I've made a program that just writes a text file. So the user runs the program and it does its job. What I want to do is that when the user runs the program with a flag (Lets say -h) it just shows a text file on the screen with the program explanation (Or better say help file) but otherwise if no flag given the program does it job. The problem is that writing the file on haskell is IO[] (I think) and outputting a text is IO[String] and then haskell doesn't allow me to have a function where it checks if there is flag, creating a text file if not or outputting a String if so because they are different types of output. Can anybody help me here?? Best Regards Alex