Skip to content
Snippets Groups Projects
Commit acd92ba7 authored by Sylvain Henry's avatar Sylvain Henry
Browse files

Use less unsafe unsafeCoerce that works with GHCJS

GHCJS uses the same representation for Addr# and StablePtr#, but not for
Int#.
parent 77990b21
Branches
Tags
1 merge request!12Use less unsafe unsafeCoerce that works with GHCJS
...@@ -662,7 +662,7 @@ instance IArray UArray (StablePtr a) where ...@@ -662,7 +662,7 @@ instance IArray UArray (StablePtr a) where
-- bogus StablePtr value for initialising a UArray of StablePtr. -- bogus StablePtr value for initialising a UArray of StablePtr.
nullStablePtr :: StablePtr a nullStablePtr :: StablePtr a
nullStablePtr = StablePtr (unsafeCoerce# 0#) nullStablePtr = StablePtr (unsafeCoerce# nullAddr#)
instance IArray UArray Int8 where instance IArray UArray Int8 where
{-# INLINE bounds #-} {-# INLINE bounds #-}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment