You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in the high level bindings we store the address type using a ForeignPtr. This is fine, since the C library may have different representations in memory. It has the unfortunate wart of requiring all interfaces that take an Address to be in the IO monad though. It would likely be cleaner to interpret the memory representation into a high-level datatype. Probably something that looks like this:
After this change, the only functions that needIO will be those that convert between memory representations and Haskell (like parseAddress). Others (like the Eq typeclass or addressPort) will not.
The text was updated successfully, but these errors were encountered:
Currently, in the high level bindings we store the address type using a
ForeignPtr
. This is fine, since the C library may have different representations in memory. It has the unfortunate wart of requiring all interfaces that take anAddress
to be in theIO
monad though. It would likely be cleaner to interpret the memory representation into a high-level datatype. Probably something that looks like this:After this change, the only functions that need
IO
will be those that convert between memory representations and Haskell (likeparseAddress
). Others (like theEq
typeclass oraddressPort
) will not.The text was updated successfully, but these errors were encountered: