-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit simplifies the local `whichFull` function (local to `whichEith`) by dropping a redundant guard as well as /always/ running `lookupPath >>= leftPathError`. Previously we had this: ``` whichFull fp = do (trace . mappend "which " . toTextIgnore) fp >> whichUntraced where whichUntraced | isAbsolute fp = checkFile | dotSlash splitOnDirs = checkFile | length splitOnDirs > 0 = lookupPath >>= leftPathError | otherwise = lookupCache >>= leftPathError splitOnDirs = splitDirectories fp ``` However `splitOnDirs` can never return the empty list, so that guard was redundant as that code path was always executed, and the /otherwise/ case never executed.
- Loading branch information
Showing
1 changed file
with
3 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters