Skip to content

Commit

Permalink
Support GHC 9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fumieval committed Nov 9, 2021
1 parent f825a39 commit a446bad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions warp/Network/Wai/Handler/Warp/ReadInt.hs
@@ -1,6 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}

-- Copyright : Erik de Castro Lopo <erikd@mega-nerd.com>
-- License : BSD3
Expand Down Expand Up @@ -41,7 +42,11 @@ data Table = Table !Addr#

{-# NOINLINE mhDigitToInt #-}
mhDigitToInt :: Word8 -> Int
#if MIN_VERSION_ghc_prim(0,8,0)
mhDigitToInt (W8# i) = I# (word2Int# (word8ToWord# (indexWord8OffAddr# addr (word2Int# (word8ToWord# i)))))
#else
mhDigitToInt (W8# i) = I# (word2Int# (indexWord8OffAddr# addr (word2Int# i)))
#endif
where
!(Table addr) = table
table :: Table
Expand Down

0 comments on commit a446bad

Please sign in to comment.