Skip to content
New issue

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

Consider matching box types to ForeignPtr #7

Open
harpocrates opened this issue Dec 27, 2017 · 1 comment
Open

Consider matching box types to ForeignPtr #7

harpocrates opened this issue Dec 27, 2017 · 1 comment

Comments

@harpocrates
Copy link
Owner

harpocrates commented Dec 27, 2017

Consider

newtype Box t = Box { unBox :: ForeignPtr t }

It might be interesting to match Box<T> types to Box t. The useful part would be being able to associated a Haskell finalizer with Boxs we get back from Rust (the finalize would just look like [rust| () { $(x: Box<..>).drop() } |]).

@harpocrates
Copy link
Owner Author

The Box type here is what I want if -XLinearTypes goes through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant