getFileType :: FileStatus -> Char
getFileType s
    | isBlockDevice s = 'b'
    | isCharacterDevice s = 'c'
    | isNamedPipe s = 'p'
    | isDirectory s = 'd'
    | isSymbolicLink s = 'l'
    | isSocket s = 's'
    | isRegularFile s = '-'
    | otherwise = '?'
getFileType :: FileStatus -> Char
getFileType s
    | isBlockDevice s = 'b'
    | isCharacterDevice s = 'c'
    | isNamedPipe s = 'p'
    | isDirectory s = 'd'
    | isSymbolicLink s = 'l'
    | isSocket s = 's'
    | isRegularFile s = '-'
    | otherwise = '?'
getFileType s
    | isBlockDevice s = 'b'
    | isCharacterDevice s = 'c'
    | isNamedPipe s = 'p'
    | isDirectory s = 'd'
    | isSymbolicLink s = 'l'
    | isSocket s = 's'
    | isRegularFile s = '-'
    | otherwise = '?'