Closed crocket closed 7 years ago
After numerous experiments, I figured out that newtypes wrapping JSVal
can subsitute JSVal
in FFI signatures and that Nullable
is just another wrapper around JSVal
.
I surmise the key to understanding GHCJS FFI lies in understanding GHC FFI.
I concluded that FromJSVal
and its siblings don't affect FFI.
According to my experiments, any
Type
with aPFromJSVal
instance can be used asNullable Type
in FFI signatures.I conjecture that
FromJSVal
instances affect FFI in a similar way.Does anyone know about this?
Below is a full demonstration of how PFromJSVal affects FFI.