Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#983 closed bug (fixed)

canonicalizePath only works in GHC

Reported by: Neil Mitchell Owned by:
Priority: normal Milestone:
Component: libraries/base Version: 6.6
Keywords: Cc: ndmitchell@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

In System.IO, the function canonicalizePath is defined as:

#ifdef __GLASGOW_HASKELL__
-- | Given path referring to a file or directory, returns a
-- canonicalized path, with the intent that two paths referring
-- to the same file\/directory will map to the same canonicalized
-- path. Note that it is impossible to guarantee that the
-- implication (same file\/dir \<=\> same canonicalizedPath) holds
-- in either direction: this function can make only a best-effort
-- attempt.
canonicalizePath :: FilePath -> IO FilePath
...
#else /* !__GLASGOW_HASKELL__ */
-- dummy implementation
canonicalizePath :: FilePath -> IO FilePath
canonicalizePath fpath = return fpath
#endif /* !__GLASGOW_HASKELL__ */

This is obviously a problem for anyone who uses Hugs or Yhc.

(Opening it as a GHC bug because it must have been someone using GHC who put this in)

Change History (7)

comment:1 Changed 7 years ago by guest

  • Cc ndmitchell@… added

comment:2 Changed 7 years ago by ross

  • Component changed from Compiler to libraries/base

comment:3 Changed 7 years ago by simonmar

The implementation doesn't look GHC-specific to me. Would you be happy for me to just enable the GHC version of that code for all platforms?

comment:4 Changed 7 years ago by Neil Mitchell

If that would work, yes. I don't have any experience with the FFI so have no idea if it will work under Hugs...

comment:5 Changed 7 years ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed

#ifdef removed.

comment:6 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:7 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.