aboutsummaryrefslogtreecommitdiff
path: root/lib/Daffm/View.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Daffm/View.hs')
-rw-r--r--lib/Daffm/View.hs18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/Daffm/View.hs b/lib/Daffm/View.hs
index 443d017..906fe26 100644
--- a/lib/Daffm/View.hs
+++ b/lib/Daffm/View.hs
@@ -38,14 +38,16 @@ fileItemView sel fileInfo@(FileInfo {fileSize, fileType, fileMode}) =
fileSizeView = str . prettyFileSize . fromIntegral
fileTypeView = str . showFileType
fileModeView = str . showFileMode
- showFileType Directory = "dir"
- showFileType SymbolicLink = "link"
- showFileType UnixSocket = "sock"
- showFileType NamedPipe = "pipe"
- showFileType CharacterDevice = "cdev"
- showFileType BlockDevice = "bdev"
- showFileType RegularFile = "file"
- showFileType UnknownFileType = "?"
+
+showFileType :: FileType -> String
+showFileType Directory = "dir"
+showFileType SymbolicLink = "link"
+showFileType UnixSocket = "sock"
+showFileType NamedPipe = "pipe"
+showFileType CharacterDevice = "cdev"
+showFileType BlockDevice = "bdev"
+showFileType RegularFile = "file"
+showFileType UnknownFileType = "?"
showFileMode :: FileMode -> String
showFileMode mode = permchars