ConsPtr compat for 8.10

This commit is contained in:
Alexander Bondarenko
2024-06-04 17:15:34 +03:00
parent c38a14194b
commit 0267c6eda9

View File

@@ -1,6 +1,8 @@
{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
@@ -10,9 +12,16 @@ module Simplex.Messaging.Crypto.NaCl.Bindings where
import Data.ByteArray (ScrubbedBytes)
import Foreign
import Foreign.C.ConstPtr
import Foreign.C.Types
#if MIN_VERSION_base(4,18,0)
import Foreign.C.ConstPtr
#else
type ConstPtr = Ptr
pattern ConstPtr :: p -> p
pattern ConstPtr p = p
#endif
crypto_box_PUBLICKEYBYTES :: Num a => a
crypto_box_PUBLICKEYBYTES = 32