(ext,fn) <- exts,
let base | path == "." = basename
| otherwise = path ++ '/':basename
- file = base ++ '.':ext
+ file = base `joinFileExt` ext
]
search [] = return (Failed (map fst to_search))
obj_fn <- mkObjPath dflags src_basename mod_basename
hi_fn <- mkHiPath dflags src_basename mod_basename
- return (ModLocation{ ml_hs_file = Just (src_basename ++ '.':ext),
+ return (ModLocation{ ml_hs_file = Just (src_basename `joinFileExt` ext),
ml_hi_file = hi_fn,
ml_obj_file = obj_fn })
= do let full_basename = path++'/':basename
obj_fn <- mkObjPath dflags full_basename basename
return ModLocation{ ml_hs_file = Nothing,
- ml_hi_file = full_basename ++ '.':hisuf,
+ ml_hi_file = full_basename `joinFileExt` hisuf,
-- Remove the .hi-boot suffix from
-- hi_file, if it had one. We always
-- want the name of the real .hi file
obj_basename | Just dir <- odir = dir ++ '/':mod_basename
| otherwise = basename
- return (obj_basename ++ '.':osuf)
+ return (obj_basename `joinFileExt` osuf)
-- | Constructs the filename of a .hi file for a given source file.
-- Does /not/ check whether the .hi file exists
hi_basename | Just dir <- hidir = dir ++ '/':mod_basename
| otherwise = basename
- return (hi_basename ++ '.':hisuf)
+ return (hi_basename `joinFileExt` hisuf)
-- -----------------------------------------------------------------------------