mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
use openFd from unix >= 2.8
This commit is contained in:
2
gf.cabal
2
gf.cabal
@@ -347,7 +347,7 @@ library
|
||||
else
|
||||
build-depends:
|
||||
terminfo >=0.4.0 && < 0.5,
|
||||
unix >= 2.7.2 && < 2.8
|
||||
unix >= 2.8
|
||||
|
||||
if impl(ghc>=8.2)
|
||||
ghc-options: -fhide-source-paths
|
||||
|
||||
@@ -34,8 +34,8 @@ stderrToFile :: FilePath -> IO ()
|
||||
stderrToFile file =
|
||||
do let mode = ownerReadMode<>ownerWriteMode<>groupReadMode<>otherReadMode
|
||||
(<>) = unionFileModes
|
||||
flags = defaultFileFlags { append = True }
|
||||
fileFd <- openFd file WriteOnly (Just mode) flags
|
||||
flags = defaultFileFlags { append = True, creat = Just mode }
|
||||
fileFd <- openFd file WriteOnly flags
|
||||
dupTo fileFd stdError
|
||||
return ()
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user