Opened 11 years ago

Closed 11 years ago

Last modified 9 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: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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

-- | 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 11 years ago by guest

Cc: ndmitchell@… added

comment:2 Changed 11 years ago by ross

Component: Compilerlibraries/base

comment:3 Changed 11 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 11 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 11 years ago by simonmar

Resolution: fixed
Status: newclosed

#ifdef removed.

comment:6 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:7 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple
Note: See TracTickets for help on using tickets.