We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We can imagine an extension to the current mkFFI which actually produces an record of bound methods / properties as follows like:
mkFFI
_Person :: { firstName :: Person -> Effect String , lastName :: Person -> Effect String , setFirstName :: Person -> String -> Effect Unit , setLastName :: Person -> String -> Effect Unit } _Person = mkNewtypedFFI (Proxy :: Proxy Person) bindPerson p = { firstName: _Person.firstName p , lastName: _Person.lastName p , setFirstName: _Person.setFirstName p , setLastName: _Person.setLastName p }
So finally users could just do:
do let p' = bindPerson p p'.setFirstName "John" n <- p'.firstName
We should just generate this bindPerson function using heterogenous and warn that there is an extra allocation behind the scene.
bindPerson
heterogenous
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We can imagine an extension to the current
mkFFI
which actually produces an record of bound methods / properties as follows like:So finally users could just do:
We should just generate this
bindPerson
function usingheterogenous
and warn that there is an extra allocation behind the scene.The text was updated successfully, but these errors were encountered: