aboutsummaryrefslogtreecommitdiff
path: root/src/BTLS/Cast.hs
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2018-08-23 17:24:47 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2018-08-23 17:24:47 -0400
commitd1a85eb87934d348c9789aec59c751fa615ec363 (patch)
tree09c72e290df883c1e2d4c7ea2ccf0b1470668ca2 /src/BTLS/Cast.hs
parent3be302655bc7e31805af4525d78beb6abfed9a5d (diff)
Clean up casts
Use unsigned char buffers more pervasively throughout the code. This removes most calls to `asCUCharBuf`, isolating `unsafeCoerce` further. By making some type signatures slightly more flexible, also eliminate most explicit integer conversions.
Diffstat (limited to 'src/BTLS/Cast.hs')
-rw-r--r--src/BTLS/Cast.hs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/BTLS/Cast.hs b/src/BTLS/Cast.hs
index a467c90..6f29469 100644
--- a/src/BTLS/Cast.hs
+++ b/src/BTLS/Cast.hs
@@ -15,11 +15,7 @@
module BTLS.Cast where
import Foreign (Ptr)
-import Foreign.C.Types
import Unsafe.Coerce (unsafeCoerce)
-asCUCharBuf :: Ptr CChar -> Ptr CUChar
-asCUCharBuf = unsafeCoerce
-
asVoidPtr :: Ptr a -> Ptr ()
asVoidPtr = unsafeCoerce