can anybody show me a small libClang example in haskell?
i have the documentation, but dont know where to start with.
a small example would be nice
The simplest example would be to follow the tests in the package. There are three tests in C along with their haskell counterparts. For example, here's a C test:
https://github.com/chetant/LibClang/blob/master/test/Test_Diagnostics.c
and its haskell counterpart:
https://github.com/chetant/LibClang/blob/master/test/Test_Diagnostics.hs
The library is mostly a verbatim copy of the original libclang with most of the callbacks and data structures "haskellized". Hackage won't build the documents (no libclang in sandbox), but you can download the latest libclang locally and build the documentation with haddock.
For info on libclang itself, check out the latest presentation on llvm from one of the developers:
http://devimages.apple.com/llvm/videos/Libclang.mov
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With