小Haskell libClang的例子?(small haskell libClang example?)

编程入门 行业动态 更新时间:2024-10-23 19:24:23
小Haskell libClang的例子?(small haskell libClang example?)

任何人都可以在Haskell中向我展示一个小的libClang例子吗?

我有文件,但不知道从哪里开始。

一个小例子会很好

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

最满意答案

最简单的例子就是遵循软件包中的测试。 C中有三个测试与他们的haskell相对应。 例如,这是一个C测试:

https://github.com/chetant/LibClang/blob/master/test/Test_Diagnostics.c

和其对应的哈斯克尔:

https://github.com/chetant/LibClang/blob/master/test/Test_Diagnostics.hs

该库大部分是原始libclang的逐字拷贝,大部分回调函数和数据结构都是“haskellized”的。 Hackage不会构建文档(沙盒中没有libclang),但您可以在本地下载最新的libclang并使用haddock构建文档。

有关libclang本身的信息,请查看来自其中一位开发人员的关于llvm的最新演示文稿:

http://devimages.apple.com/llvm/videos/Libclang.mov

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

更多推荐

本文发布于:2023-08-07 10:39:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1463795.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:例子   libClang   Haskell   small   haskell

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!