Skip to content

Commit 46f275e

Browse files
mmhathasufell
authored andcommitted
Applied suggestions from code review
1 parent 937c0b1 commit 46f275e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

System/Posix/Directory/Common.hsc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ getRealDirType _ SocketType = return SocketType
196196
getRealDirType _ WhiteoutType = return WhiteoutType
197197
getRealDirType getFileStatus _ = do
198198
stat <- getFileStatus
199-
return $ if | isBlockDevice stat -> BlockDeviceType
200-
| isCharacterDevice stat -> CharacterDeviceType
201-
| isNamedPipe stat -> NamedPipeType
202-
| isRegularFile stat -> RegularFileType
199+
return $ if | isRegularFile stat -> RegularFileType
203200
| isDirectory stat -> DirectoryType
204201
| isSymbolicLink stat -> SymbolicLinkType
202+
| isBlockDevice stat -> BlockDeviceType
203+
| isCharacterDevice stat -> CharacterDeviceType
204+
| isNamedPipe stat -> NamedPipeType
205205
| isSocket stat -> SocketType
206206
| otherwise -> UnknownType
207207

@@ -255,7 +255,7 @@ readDirStreamWith f dstream = alloca
255255
-- | A version of 'readDirStreamWith' that takes a pre-allocated pointer in
256256
-- addition to the other arguments. This pointer is used to store the pointer
257257
-- to the next directory entry, if there is any. This function is intended for
258-
-- usecases where you need to read a lot of directory entries and want to
258+
-- use cases where you need to read a lot of directory entries and want to
259259
-- reuse the pointer for each of them. Using for example 'readDirStream' or
260260
-- 'readDirStreamWith' in this scenario would allocate a new pointer for each
261261
-- call of these functions.

0 commit comments

Comments
 (0)