Skip to content

Commit

Permalink
Merge pull request #6 from RyanGlScott/windows-ucrt-fix
Browse files Browse the repository at this point in the history
Avoid Windows linker errors with GHC 9.4.5+
  • Loading branch information
mitchellwrosen committed May 11, 2023
2 parents f4df48e + 1976fb5 commit b9e1084
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/Text/Builder/ANSI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ import Data.Semigroup ((<>))
import Text.Builder (Builder)
import qualified Text.Builder as Builder
import Data.Word (Word8)
import Foreign.C (CInt (CInt))
import System.IO.Unsafe (unsafePerformIO)
import System.Posix.Internals (c_isatty)

-- $intro
--
Expand Down Expand Up @@ -370,9 +370,6 @@ isatty =
unsafePerformIO (c_isatty 1) == 1
{-# NOINLINE isatty #-}

foreign import ccall unsafe "isatty"
c_isatty :: CInt -> IO CInt

-- Collapse surround/surround to a single surround before phase 1
{-# RULES
"surround/surround" [~1] forall a b c d s.
Expand Down
5 changes: 1 addition & 4 deletions src/Text/Lazy/Builder/ANSI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ import Data.Text.Lazy.Builder (Builder)
import qualified Data.Text.Lazy.Builder as Builder
import qualified Data.Text.Lazy.Builder.Int as Builder
import Data.Word (Word8)
import Foreign.C (CInt (CInt))
import System.IO.Unsafe (unsafePerformIO)
import System.Posix.Internals (c_isatty)

-- $intro
--
Expand Down Expand Up @@ -371,9 +371,6 @@ isatty =
unsafePerformIO (c_isatty 1) == 1
{-# NOINLINE isatty #-}

foreign import ccall unsafe "isatty"
c_isatty :: CInt -> IO CInt

-- Collapse surround/surround to a single surround before phase 1
{-# RULES
"surround/surround" [~1] forall a b c d s.
Expand Down

0 comments on commit b9e1084

Please sign in to comment.