[Haskell-beginners] checking file type (without getLine)