Reverse the directory list when building the home package directory
cache, so that earlier entries override later ones.
contents <- softGetDirectoryContents path
let clean_contents = filter isUsefulFile contents
return (addListToFM fm (zip clean_contents (repeat path)))
- home_map <- foldM extendFM emptyFM home_imports
+ home_map <- foldM extendFM emptyFM (reverse home_imports)
writeIORef v_HomeDirCache (Just home_map)
return home_map