6 ms·
myfromJust has a too specific type, and really should just be inlined as: fromMaybe "" checkInputFile encodes a no-result as a "no" string. This is a very u
by Peaker 15y ago
myfromJust has a too specific type, and really should just be inlined as:
fromMaybe ""
checkInputFile encodes a no-result as a "no" string. This is a very un-Haskelly thing to do (Use a Maybe String, instead).
Use of C's if syntax is a bit weird, too. No need for these extra parens.
getRandomName weirdly uses getStdGen/newStdGen instead of just making a random generator directly.
basename is (incorrectly) duplicating standard library behavior.
saveFile uses fromJust, will crash at runtime.