Skip to content

Commit

Permalink
System.Posix.Terminal.PosixString: Fix imports in HAVE_OPENPTY path
Browse files Browse the repository at this point in the history
This appears to have broken with the `os-string` split of
`filepath-1.5`.
  • Loading branch information
bgamari committed Feb 2, 2024
1 parent 7db23ec commit a234ee1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 9 additions & 3 deletions System/Posix/Terminal/PosixString.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,18 @@ module System.Posix.Terminal.PosixString (
import Foreign
import System.Posix.Types
import System.Posix.Terminal.Common

#ifndef HAVE_OPENPTY
import qualified System.OsPath.Data.ByteString.Short as SBS
import System.Posix.IO.ByteString (defaultFileFlags, openFd, noctty, OpenMode(ReadWrite))
import Data.ByteString.Char8 as B ( pack, )
import qualified System.OsPath.Data.ByteString.Short as BC
import System.Posix.IO.ByteString (defaultFileFlags, openFd, noctty, OpenMode(ReadWrite))
import System.OsString.Internal.Types (PosixString(..))
#if MIN_VERSION_filepath(1,5,0)
import qualified System.OsString.Data.ByteString.Short as SBS
import qualified System.OsString.Data.ByteString.Short as BC
#else
import qualified System.OsPath.Data.ByteString.Short as SBS
import qualified System.OsPath.Data.ByteString.Short as BC
#endif
#endif

import Foreign.C hiding (
Expand Down
3 changes: 3 additions & 0 deletions cabal.project.wasm32-wasi
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
packages: .

package unix
-- Necessary as otherwise the `allow-newer` below will cause cabal to fail to
-- infer a consistent value of this flag.
flags: +os-string
ghc-options: -Wno-unused-imports

write-ghc-environment-files: always
Expand Down

0 comments on commit a234ee1

Please sign in to comment.