-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This package does not build with GHC 9.4.8. #6
Comments
After removing the white space about all diff --git a/src/Data/ByteString/Base32/Internal.hs b/src/Data/ByteString/Base32/Internal.hs
index aa7c5b3..29a9720 100644
--- a/src/Data/ByteString/Base32/Internal.hs
+++ b/src/Data/ByteString/Base32/Internal.hs
@@ -70,7 +70,7 @@ padCeilN !n !x
-----------------------------------------------------------------------}
unpack5Ptr :: Ptr Word8 -> ByteString -> ByteString
-unpack5Ptr !tbl bs @ (PS fptr off sz) =
+unpack5Ptr !tbl bs@(PS fptr off sz) =
unsafePerformIO $ do
let unpackedSize = dstSize $ BS.length bs
BS.create unpackedSize $ \ dst -> do
@@ -164,7 +164,7 @@ cleanup io = unsafePerformIO $
handler (ErrorCall msg) = return (Left msg)
pack5Ptr :: Ptr Word5 -> ByteString -> Result ByteString
-pack5Ptr !tbl bs @ (PS fptr off sz) =
+pack5Ptr !tbl bs@(PS fptr off sz) =
cleanup $ do
let packedSize = dstSize $ BS.length bs
BS.createAndTrim packedSize $ \ dst -> do
@@ -176,7 +176,7 @@ pack5Ptr !tbl bs @ (PS fptr off sz) =
lookupTable ix
| x == invIx = error $ show (w2c ix) ++ " is not base32 character"
| otherwise = x
- where x = inlinePerformIO (peekByteOff tbl (fromIntegral ix))
+ where x = unsafePerformIO (peekByteOff tbl (fromIntegral ix))
{-# INLINE lookupTable #-}
dstSize x = d + if m == 0 then 0 else 1
@@ -248,10 +248,10 @@ pack5 (PS fptr off len) bs
isInAlphabet :: Ptr Word5 -> Word8 -> Bool
isInAlphabet !tbl !ix =
- inlinePerformIO (peekByteOff tbl (fromIntegral ix)) /= invIx
+ unsafePerformIO (peekByteOff tbl (fromIntegral ix)) /= invIx
pack5Lenient :: DecTable -> ByteString -> Either String ByteString
-pack5Lenient tbl @ (PS fptr _ _) bs =
+pack5Lenient tbl@(PS fptr _ _) bs =
unsafePerformIO $ do
withForeignPtr fptr $ \ !tbl_ptr -> do
return $! pack5 tbl $ BS.filter (isInAlphabet tbl_ptr) bs I have not checked if the package works as it should though. |
This was referenced May 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what I do
what should happen
Running
cabal build
should build the package.discussion
The reason for this error is that the parsing of
@
has become white space sensitive, I think since the proposal ghc-proposals/ghc-proposals#229, so in this case white space about the@
needs to be cut away.The text was updated successfully, but these errors were encountered: