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

bug: foreign import type mismatch #80

Open
claudeha opened this issue Dec 17, 2018 · 0 comments
Open

bug: foreign import type mismatch #80

claudeha opened this issue Dec 17, 2018 · 0 comments

Comments

@claudeha
Copy link
Contributor

There is:

void descend_cpu(int len, double rate, ...);

and

foreign import ccall unsafe descend_cpu :: Int -> Double -> ... -> IO ()

but these don't match on amd64 Linux (int is 32bit and Int is 64bit).

Should probably be size_t in the C and CSize in the FFI import.

(Also to be pedantic it should be CDouble, which you can cast efficiently using coerce which should fail to compile on systems where Double /= CDouble, but I don't know if any exist. realToFrac is the wrong thing to use.)

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