Note that the return type is void *, a pointer, and not void. Hence, this PR changes the return type from IO () to IO (Ptr a); was e.g. done here in the very similar code in array.
This will probably not change anything on most platform; concrete motivation is that compiling regex-tdfa using the GHC 9.6 WASM backend did yield a link-time warning:
wasm-ld: warning: function signature mismatch: memcpy
>>> defined as (i32, i32, i32) -> void in [...]/lib/libHSregex-tdfa-1.3.2.1-[...].a(Engine.o)
>>> defined as (i32, i32, i32) -> i32 in [...]/share/wasi-sysroot/lib/wasm32-wasi/libc.a(memcpy.o)
Consider the signature of
memcpy
(e.g. from here):Note that the return type is
void *
, a pointer, and notvoid
. Hence, this PR changes the return type fromIO ()
toIO (Ptr a)
; was e.g. done here in the very similar code inarray
.This will probably not change anything on most platform; concrete motivation is that compiling
regex-tdfa
using the GHC 9.6 WASM backend did yield a link-time warning: