How is Foreign Function Interface (FFI) used with Stack?

Published: 5/10/2017
How is Foreign Function Interface (FFI) used with Stack?
Source: STACKOVERFLOW.COM

I was following some FFI tutorials and examples ( here and here ), and I was wondering what should change when using stack? In the examples, the source C file is compiled to an object file using gcc -c -o termops.o termops.c and included in the gcc compilation using ghc --make -main-is FfiEx -o ffi_ex FfiEx.hs termops.o . How can the equivalent be accomplished using stack?

Read more
Related news
Comment