hsc2hs

A preprocessor that helps with writing Haskell bindings to C code

Version on this page:0.68.4@rev:1
LTS Haskell 22.14:0.68.10@rev:2
Stackage Nightly 2024-03-28:0.68.10@rev:2
Latest on Hackage:0.68.10@rev:2

See all snapshots hsc2hs appears in

BSD-3-Clause licensed by Marcin Kowalczyk
Maintained by [email protected]
This version can be pinned in stack with:hsc2hs-0.68.4@sha256:713092fccf64712b510ef1228695b14e1bf7ef0d1b2ce069776e0dcf894d4bf1,2437

Module documentation for 0.68.4

There are no documented modules for this package.

The hsc2hs program can be used to automate some parts of the process of writing Haskell bindings to C code. It reads an almost-Haskell source file with embedded special constructs, and outputs a real Haskell file with these constructs processed, based on information taken from some C headers. The extra constructs provide Haskell counterparts of C types, values of C constants, including sizes of C types, and access to fields of C structs.

For more details, see the hsc2hs section in the GHC User's Guide.

Changes

0.68.4

  • Add support to read command line arguments supplied via response files (#13896)

0.68.2

  • Support GHC 8.2.1

  • Make hsc_alignment macro work in clang (D3346)

  • Track column numbers to improve GHC’s caret diagnostic display (#13388)

0.68.1

  • Fix type signature of generated main test function to avoid C compiler warnings about unused argc/argv function parameters during feature testing.

  • Double-escape paths used to build call to hsc_line (#12504)