-- for SOURCE imports, check the hi-boot extensions
-- before the source/iface ones, to avoid
-- creating circ Makefile deps.
-- for SOURCE imports, check the hi-boot extensions
-- before the source/iface ones, to avoid
-- creating circ Makefile deps.
+ -- last chance: .hi-boot-<ver> and .hi-boot
+ hi_boot_ver = "hi-boot-" ++ cHscIfaceFileVersion
+
+ boot_exts =
+ [ (hi_boot_ver, \ fName path -> mkHiOnlyModuleLocn mod_name fName)
+ , ("hi-boot", \ fName path -> mkHiOnlyModuleLocn mod_name fName)
+ ]
+
- ((package_hisuf,\ fName path -> retPackageModule mod_name Nothing path) :
- -- can packages contain hi-boots?
- (if hiOnly then [] else
- [ ("hs", \ fName path -> retPackageModule mod_name (Just fName) path)
- , ("lhs", \ fName path -> retPackageModule mod_name (Just fName) path)
- ]))
+ (if is_source then boot_exts else
+ ((package_hisuf,\ fName path -> retPackageModule mod_name Nothing path) :
+ (if hiOnly then [] else
+ [ ("hs", \ fName path -> retPackageModule mod_name (Just fName) path)
+ , ("lhs", \ fName path -> retPackageModule mod_name (Just fName) path)
+ ])))