One of my favorite "demos" of Rust was calling Rust from Haskell. So I thought I try to do that with Nim.
I just made a very simple one for now (no complex types involved). Still it was a bit more complicated to get it to work. Basically because Nim insisted on using "llvm-ar" which is just "ar" on OS X. GCC also failed because the "-fasm-table" was still the default in my etc (I think @Araq wanted to fix that one day. I am to unsure about how universal that is to make a PR).
Then I got bugged by the name of the library (libfact.nim.a) which I could change to something else with the Nim compiler. I guess I just miss something (again).
After that worked I used "unsigned" at first but then realized that Haskell uses Int (64) and so I thought I may just ditch the "unsigned" which was in the Rust example. That worked well. The overflow will cause a segfault in Haskell which can probably handled better. I did not look into that.
If you are interested you find the Repository here: Nim-Haskell-FFI