Haskell newbie here!
I could use some feedback on a very
small program I've written:https://github.com/ThomasLocke/passgen/blob/master/src/Main.hs
Yea, not exactly advanced stuff there, but since my aging brain is already mightily challenged by Haskell, it felt like a good place to start.
I have some problems with my program:
1. I feel like I'm having IO stuff all over the place. Can more of my functions be made pure?
2. Two outputAndExit functions. ARGH! Try as I might, I cannot figure out how to fold those two down to one. I suspect this is closely linked to issue 1.
3. I don't enjoy calling length charPool
over and over in the randChar function, but I also don't feel like having the length set as a potentially wrong constant. What can I do?
Note that I'm not interested in creating cryptographically safe passwords. This is a toy
program, with the sole intention of teaching myself to write Haskell. You gotta start somewhere.
Any and all advice/help is much appreciated. :o)