Commit 176d73e4 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Use `open(2)` directly rather than via `__hscore_open()`

As we don't support Windows, there's no benefit in going via
`__hscore_open()`
parent b54bd5fc
{-# LANGUAGE NondecreasingIndentation, RecordWildCards #-}
{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE NondecreasingIndentation #-}
{-# LANGUAGE RecordWildCards #-}
#if __GLASGOW_HASKELL__ >= 709
{-# LANGUAGE Safe #-}
#else
......@@ -182,7 +184,7 @@ open_ str how maybe_mode (OpenFileFlags appendFlag exclusiveFlag nocttyFlag
WriteOnly -> (#const O_WRONLY)
ReadWrite -> (#const O_RDWR)
foreign import ccall unsafe "__hscore_open"
foreign import capi unsafe "HsUnix.h open"
c_open :: CString -> CInt -> CMode -> IO CInt
-- |Close this file descriptor. May throw an exception if this is an
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment