[C2hs] Wish list

Achim Schneider barsoap at web.de
Sun Jan 25 19:26:03 EST 2009


Here are the things that I'd like to have:

- Not nuking comments inside {#enum define#}, so haddocks can be aligned

- {#fun [compile|ignore]#}: 
  If a C function definition comes with a block instead of a semicolon,
  emit an error and demand to know whether 
  a) the header is confused and default behaviour is desired (ignore)
  b) a c file should be emitted that contains the code (compile)
  This is very, very useful for headers that generate a lot of inline
  functions that don't get compiled into some .o/.so
  -- This will be done before the first release of complete agar
     bindings, as I can't be arsed to do it manually and rather hack
     c2hs than an ad-hoc grep on steroids. I don't know when (if ever)
     that'll be, though.

- Nearly the same as above, but for trivial #defines, e.g.
  #define alignHoriz(foo) (align((foo), ALIGN_HORIZ))
  This is _much_ harder than snatching whole functions out of the
  headers, as one needs to evaluate, possibly nested, #defines until a
  compiled function is found, to generate a C stub or the equivalent of
  the macro in Haskell.

- Something else I don't remember right now.

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.




More information about the C2hs mailing list