Popularity
8.2
Declining
Activity
0.0
Stable
31
5
15
Monthly Downloads: 25
Programming language: Haskell
License: Apache License 2.0
Tags:
Language
Latest version: v0.2.0.3
clang-pure alternatives and similar packages
Based on the "Language" category.
Alternatively, view clang-pure alternatives based on common mentions on social networks and blogs.
-
elm-compiler
Compiler for Elm, a functional language for reliable webapps. -
stylish-haskell
Haskell code prettifier [Moved to: https://github.com/haskell/stylish-haskell] -
haskell-src-exts
Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer -
haskell-tools-ast-fromghc
Developer tools for Haskell -
liquid-fixpoint
Horn Clause Constraint Solving for Liquid Types -
language-python
A parser for Python 2.x and 3.x written in Haskell -
nirum
Nirum: IDL compiler and RPC/distributed object framework for microservices -
tal
An implementation of Typed Assembly Language (Morrisett, Walker, Crary, Glew) -
camfort
Light-weight verification and transformation tools for Fortran -
language-c-quote
C/CUDA/OpenCL/Objective-C quasiquoting library. -
language-ecmascript
Haskell library: ECMAScript parser, pretty-printer and additional tools -
aterm-utils
Utility functions for working with aterms as generated by Minitermite -
ministg
Ministg is an interpreter for a high-level, small-step, operational semantics for the STG machine.
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of clang-pure or a related project?
README
Pure Haskell bindings to libclang
A Haskell library for pure C++ code analysis
API examples
Enumerate all function declarations in main.cpp
module Main (main) where
import Control.Monad
import Language.C.Clang
main :: IO ()
main = do
idx <- createIndex
tu <- parseTranslationUnit idx "main.cpp" ["-I/usr/local/include"]
let root = translationUnitCursor tu
children = cursorChildren root
functionDecls = filter (\c -> cursorKind c == FunctionDecl) children
forM_ functionDecls (print . cursorSpelling)
List all function declarations and their types, lens
-style
idx <- createIndex
tu <- parseTranslationUnit idx path clangArgs
let funDecs =
-- fold over cursors recursively
cursorDescendantsF
-- finding FunctionDecls...
. folding (matchKind @'FunctionDecl)
-- ...that are actually in the given file
. filtered (isFromMainFile . rangeStart . cursorExtent)
-- and get their names and types
. to (\funDec -> cursorSpelling funDec <> " :: " <> typeSpelling (cursorType funDec))
BS.putStrLn $ BS.unlines (translationUnitCursor tu ^.. funDecs)
Development
[View development guide][building]