开发者

small haskell libClang example?

开发者 https://www.devze.com 2023-03-06 03:58 出处:网络
can anybody show me a small libClang example in haskell? i have the documentation, but dont know where to start with.

can anybody show me a small libClang example in haskell?

i have the documentation, but dont know where to start with.

a 开发者_JS百科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

0

精彩评论

暂无评论...
验证码 换一张
取 消