Closed phadej closed 9 months ago
This reminds me of https://github.com/haskell/directory/issues/147. I don't think directory should support SafeHaskell at all going forward, and thus the question of whether directory is Safe or Unsafe is indeterminate / undefined.
CC @Bodigrim
BTW, what happens if you try to import System.OsPath
under ghc-9.6.2?
@Rufflewind I don't import that. I use System.Directory
.
I don't import that. I use
System.Directory
.
I asked that question to help diagnose the root cause, in case someone was curious. Since System.Directory
depends on System.OsPath
, the inferred Safe-ty of System.Directory
relies on that. This is what I could gather from my system:
GHCi, version 9.6.2: https://www.haskell.org/ghc/ :? for help
ghci> :set -XSafe
<no location info>: warning:
-XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -GeneralizedNewtypeDeriving
ghci> import System.OsPath
<no location info>: error: [GHC-44360]
System.OsPath: Can't be safely imported!
The module itself isn't safe.
Regardless, SafeHaskell is not supported by directory, so I don't think any action is planned to be taken here.
Closing because SafeHaskell is not supported by directory.
Could
directory
be made explicitlyTrustworthy
(orUnsafe
it's that's the case).filepath
is explicitlySafe
https://github.com/haskell/filepath/blob/51501dba4f963087eac2b67ed13b64fe0304d63b/System/FilePath.hs#L2-L4, so I'd expectdirectory
to be too.