packages feed

clang-pure 0.1.0.3 → 0.2.0.0

raw patch · 9 files changed

+421/−14 lines, 9 filesdep +clang-puredep +hashabledep +lensdep ~basedep ~bytestringdep ~inline-cnew-component:exe:find-classesnew-component:exe:list-fun-typesPVP ok

version bump matches the API change (PVP)

Dependencies added: clang-pure, hashable, lens, microlens, microlens-contra, singletons, unordered-containers

Dependency ranges changed: base, bytestring, inline-c

API changes (from Hackage documentation)

- Language.C.Clang.TranslationUnit: translationUnitCursor :: TranslationUnit -> Cursor
+ Language.C.Clang.Cursor: translationUnitCursor :: TranslationUnit -> Cursor
+ Language.C.Clang.Cursor.Typed: AddrLabelExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: AnnotateAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ArraySubscriptExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: AsmLabelAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: AsmStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: BinaryOperator :: CursorKind
+ Language.C.Clang.Cursor.Typed: BlockExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: BreakStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: CStyleCastExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CUDAConstantAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CUDADeviceAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CUDAGlobalAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CUDAHostAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXAccessSpecifier :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXBaseSpecifier :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXBoolLiteralExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXCatchStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXConstCastExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXDeleteExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXDynamicCastExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXFinalAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXForRangeStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXFunctionalCastExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXMethod :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXNewExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXNullPtrLiteralExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXOverrideAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXReinterpretCastExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXStaticCastExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXThisExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXThrowExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXTryStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: CXXTypeidExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CallExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CaseStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: CharacterLiteral :: CursorKind
+ Language.C.Clang.Cursor.Typed: ClassDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ClassTemplate :: CursorKind
+ Language.C.Clang.Cursor.Typed: ClassTemplatePartialSpecialization :: CursorKind
+ Language.C.Clang.Cursor.Typed: CompoundAssignOperator :: CursorKind
+ Language.C.Clang.Cursor.Typed: CompoundLiteralExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: CompoundStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ConditionalOperator :: CursorKind
+ Language.C.Clang.Cursor.Typed: ConstAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: Constructor :: CursorKind
+ Language.C.Clang.Cursor.Typed: ContinueStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ConversionFunction :: CursorKind
+ Language.C.Clang.Cursor.Typed: CursorK :: Cursor -> CursorK
+ Language.C.Clang.Cursor.Typed: DeclRefExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: DeclStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: DefaultStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: Destructor :: CursorKind
+ Language.C.Clang.Cursor.Typed: DoStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: EnumConstantDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: EnumDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: FieldDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: FirstAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: FirstDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: FirstExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: FirstExtraDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: FirstInvalid :: CursorKind
+ Language.C.Clang.Cursor.Typed: FirstPreprocessing :: CursorKind
+ Language.C.Clang.Cursor.Typed: FirstRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: FirstStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: FloatingLiteral :: CursorKind
+ Language.C.Clang.Cursor.Typed: ForStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: FunctionDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: FunctionTemplate :: CursorKind
+ Language.C.Clang.Cursor.Typed: GCCAsmStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: GNUNullExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: GenericSelectionExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: GotoStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: IBActionAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: IBOutletAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: IBOutletCollectionAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: IfStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ImaginaryLiteral :: CursorKind
+ Language.C.Clang.Cursor.Typed: InclusionDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: IndirectGotoStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: InitListExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: IntegerLiteral :: CursorKind
+ Language.C.Clang.Cursor.Typed: InvalidCode :: CursorKind
+ Language.C.Clang.Cursor.Typed: InvalidFile :: CursorKind
+ Language.C.Clang.Cursor.Typed: LabelRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: LabelStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: LambdaExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: LastAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: LastDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: LastExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: LastExtraDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: LastInvalid :: CursorKind
+ Language.C.Clang.Cursor.Typed: LastPreprocessing :: CursorKind
+ Language.C.Clang.Cursor.Typed: LastRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: LastStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: LinkageSpec :: CursorKind
+ Language.C.Clang.Cursor.Typed: MSAsmStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: MacroDefinition :: CursorKind
+ Language.C.Clang.Cursor.Typed: MacroExpansion :: CursorKind
+ Language.C.Clang.Cursor.Typed: MacroInstantiation :: CursorKind
+ Language.C.Clang.Cursor.Typed: MemberRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: MemberRefExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ModuleImportDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: Namespace :: CursorKind
+ Language.C.Clang.Cursor.Typed: NamespaceAlias :: CursorKind
+ Language.C.Clang.Cursor.Typed: NamespaceRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: NoDeclFound :: CursorKind
+ Language.C.Clang.Cursor.Typed: NoDuplicateAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: NonTypeTemplateParameter :: CursorKind
+ Language.C.Clang.Cursor.Typed: NotImplemented :: CursorKind
+ Language.C.Clang.Cursor.Typed: NullStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPBarrierDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPCriticalDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPFlushDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPForDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPMasterDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPParallelDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPParallelForDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPParallelSectionsDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPSectionDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPSectionsDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPSimdDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPSingleDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPTaskDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPTaskwaitDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: OMPTaskyieldDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCAtCatchStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCAtFinallyStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCAtSynchronizedStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCAtThrowStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCAtTryStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCAutoreleasePoolStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCBoolLiteralExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCBridgedCastExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCCategoryDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCCategoryImplDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCClassMethodDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCClassRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCDynamicDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCEncodeExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCForCollectionStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCImplementationDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCInstanceMethodDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCInterfaceDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCIvarDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCMessageExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCPropertyDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCProtocolDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCProtocolExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCProtocolRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCSelectorExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCSelfExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCStringLiteral :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCSuperClassRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: ObjCSynthesizeDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: OverloadedDeclRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: PackExpansionExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: PackedAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ParenExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ParmDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: PreprocessingDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: PureAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: ReturnStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: SEHExceptStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: SEHFinallyStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: SEHLeaveStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: SEHTryStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: SizeOfPackExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: StmtExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: StringLiteral :: CursorKind
+ Language.C.Clang.Cursor.Typed: StructDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: SwitchStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: TemplateRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: TemplateTemplateParameter :: CursorKind
+ Language.C.Clang.Cursor.Typed: TemplateTypeParameter :: CursorKind
+ Language.C.Clang.Cursor.Typed: TranslationUnit :: CursorKind
+ Language.C.Clang.Cursor.Typed: TypeAliasDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: TypeRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: TypedefDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: UnaryExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: UnaryOperator :: CursorKind
+ Language.C.Clang.Cursor.Typed: UnexposedAttr :: CursorKind
+ Language.C.Clang.Cursor.Typed: UnexposedDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: UnexposedExpr :: CursorKind
+ Language.C.Clang.Cursor.Typed: UnexposedStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: UnionDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: UsingDeclaration :: CursorKind
+ Language.C.Clang.Cursor.Typed: UsingDirective :: CursorKind
+ Language.C.Clang.Cursor.Typed: VarDecl :: CursorKind
+ Language.C.Clang.Cursor.Typed: VariableRef :: CursorKind
+ Language.C.Clang.Cursor.Typed: WhileStmt :: CursorKind
+ Language.C.Clang.Cursor.Typed: [withoutKind] :: CursorK -> Cursor
+ Language.C.Clang.Cursor.Typed: class HasChildren (kind :: CursorKind)
+ Language.C.Clang.Cursor.Typed: class HasExtent (kind :: CursorKind)
+ Language.C.Clang.Cursor.Typed: class HasSpelling (kind :: CursorKind)
+ Language.C.Clang.Cursor.Typed: class HasType (kind :: CursorKind)
+ Language.C.Clang.Cursor.Typed: cursorChildren :: HasChildren kind => CursorK kind -> [Cursor]
+ Language.C.Clang.Cursor.Typed: cursorChildrenF :: HasChildren kind => Fold (CursorK kind) Cursor
+ Language.C.Clang.Cursor.Typed: cursorExtent :: HasExtent kind => CursorK kind -> SourceRange
+ Language.C.Clang.Cursor.Typed: cursorSpelling :: HasSpelling kind => CursorK kind -> ByteString
+ Language.C.Clang.Cursor.Typed: cursorType :: HasType kind => CursorK kind -> Type
+ Language.C.Clang.Cursor.Typed: data Cursor
+ Language.C.Clang.Cursor.Typed: data CursorKind
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.ArraySubscriptExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.BinaryOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CStyleCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXBaseSpecifier
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXCatchStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXConstCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXDeleteExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXDynamicCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXFunctionalCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXNewExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXReinterpretCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXStaticCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CXXTryStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CaseStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.ClassTemplate
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.ClassTemplatePartialSpecialization
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.CompoundAssignOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.ConditionalOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.DeclStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.DefaultStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.DoStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.EnumDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.ForStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.FunctionTemplate
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.IfStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.InitListExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.ParenExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.SwitchStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.TranslationUnit
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.UnaryOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.UnionDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.UsingDeclaration
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.UsingDirective
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasChildren 'Language.C.Clang.Internal.Types.WhileStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ArraySubscriptExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.AsmLabelAttr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.BinaryOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.BreakStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CStyleCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXAccessSpecifier
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXBaseSpecifier
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXBoolLiteralExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXCatchStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXConstCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXDeleteExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXDynamicCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXFunctionalCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXMethod
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXNewExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXReinterpretCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXStaticCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXThisExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXThrowExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CXXTryStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CallExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CaseStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CharacterLiteral
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ClassDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ClassTemplate
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ClassTemplatePartialSpecialization
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CompoundAssignOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.CompoundStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ConditionalOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ConstAttr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.Constructor
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ContinueStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ConversionFunction
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.DeclRefExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.DeclStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.DefaultStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.Destructor
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.DoStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.EnumConstantDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.EnumDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.FloatingLiteral
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ForStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.FunctionDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.FunctionTemplate
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.GNUNullExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.IfStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.InitListExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.MemberRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.MemberRefExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.Namespace
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.NamespaceRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.NonTypeTemplateParameter
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.NullStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.OverloadedDeclRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ParenExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.PureAttr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.ReturnStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.StringLiteral
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.StructDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.SwitchStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.TemplateRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.TemplateTypeParameter
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.TranslationUnit
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.TypeRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.TypedefDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.UnaryOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.UnionDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.UsingDeclaration
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.UsingDirective
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasExtent 'Language.C.Clang.Internal.Types.WhileStmt
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.AsmLabelAttr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.CXXBaseSpecifier
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.CXXMethod
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.ClassDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.ClassTemplate
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.ClassTemplatePartialSpecialization
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.Constructor
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.ConversionFunction
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.Destructor
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.EnumConstantDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.FunctionDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.FunctionTemplate
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.MemberRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.Namespace
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.NamespaceRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.OverloadedDeclRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.StringLiteral
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.TemplateRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.TranslationUnit
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.TypeRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.TypedefDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasSpelling 'Language.C.Clang.Internal.Types.UsingDeclaration
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.ArraySubscriptExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.BinaryOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CStyleCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXBaseSpecifier
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXBoolLiteralExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXConstCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXDeleteExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXDynamicCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXFunctionalCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXMethod
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXNewExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXReinterpretCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXStaticCastExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXThisExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CXXThrowExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CallExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CharacterLiteral
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.ClassDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.ClassTemplatePartialSpecialization
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.CompoundAssignOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.ConditionalOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.Constructor
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.ConversionFunction
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.DeclRefExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.Destructor
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.EnumConstantDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.EnumDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.FieldDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.FloatingLiteral
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.FunctionDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.FunctionTemplate
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.GNUNullExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.InitListExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.IntegerLiteral
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.MemberRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.MemberRefExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.NonTypeTemplateParameter
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.ParenExpr
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.ParmDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.StringLiteral
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.StructDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.TemplateTypeParameter
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.TypeRef
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.TypedefDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.UnaryOperator
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.UnionDecl
+ Language.C.Clang.Cursor.Typed: instance Language.C.Clang.Cursor.Typed.HasType 'Language.C.Clang.Internal.Types.VarDecl
+ Language.C.Clang.Cursor.Typed: matchKind :: forall kind. SingI kind => Cursor -> Maybe (CursorK kind)
+ Language.C.Clang.Cursor.Typed: newtype CursorK (kind :: CursorKind)
+ Language.C.Clang.Cursor.Typed: translationUnitCursor :: TranslationUnit -> CursorK TranslationUnit
- Language.C.Clang.Cursor: cursorChildrenF :: (Applicative f, Contravariant f) => (Cursor -> f Cursor) -> (Cursor -> f Cursor)
+ Language.C.Clang.Cursor: cursorChildrenF :: Fold Cursor Cursor

Files

+ app/FindClasses.hs view
@@ -0,0 +1,61 @@+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE DeriveGeneric #-}++module Main where++import qualified Data.ByteString as BS+import           Data.List+import qualified Data.HashMap.Strict as HMS+import           Data.Hashable+import           Language.C.Clang+import           Language.C.Clang.Cursor+import           Control.Lens+import           Data.Traversable+import           Data.Maybe+import           GHC.Generics (Generic)+import           System.Environment++deriving instance Generic CursorKind+instance Hashable CursorKind++classes :: [ ( String, Cursor -> Bool ) ]+classes =+  [ ( "HasType", isJust . cursorType )+  , ( "HasChildren", notNullOf cursorChildrenF )+  , ( "HasExtent", isJust . cursorExtent )+  , ( "HasSpelling", not . BS.null . cursorSpelling )+  ]++main :: IO ()+main = do+  args <- getArgs+  case args of+    [] -> putStrLn "usage: find-classes file1 [file2] [fileN...]"++    paths -> do+      idx <- createIndex++      pathClassResults <- for paths $ \path -> do+        tu <- parseTranslationUnit idx path []+        let root = translationUnitCursor tu+        return $ HMS.fromList+          [ ( className, findClass predicate root )+          | ( className, predicate ) <- classes+          ]++      let classResults = foldl1' (HMS.unionWith (HMS.unionWith (&&))) pathClassResults++      let allInstances =+            intercalate "\n"+              [ instances+              | ( className, kindResults ) <- HMS.toList classResults+              , let sortedNames = sort [ show kind | ( kind, matches ) <- HMS.toList kindResults, matches ]+              , let instances = unlines $ map (\kindName -> "instance " ++ className ++ " '" ++ kindName) sortedNames+              ]++      putStrLn allInstances++findClass :: (Cursor -> Bool) -> Cursor -> HMS.HashMap CursorKind Bool+findClass predicate root = HMS.fromListWith (&&) kindResults+  where+    kindResults = root ^.. cosmosOf cursorChildrenF . to (\c -> ( cursorKind c, predicate c ) )
clang-pure.cabal view
@@ -1,5 +1,5 @@ name:                  clang-pure-version:               0.1.0.3+version:               0.2.0.0 synopsis:              Pure C++ code analysis with libclang description:   Pure C++ code analysis with libclang.@@ -13,9 +13,8 @@ copyright:             Copyright 2014 Google Inc. All Rights Reserved. category:              Language build-type:            Custom--- extra-source-files:   cabal-version:         >=1.10-extra-source-files:  cbits/utils.h+extra-source-files:    cbits/utils.h  source-repository head   type: git@@ -24,6 +23,7 @@ library   exposed-modules:     Language.C.Clang,                        Language.C.Clang.Cursor,+                       Language.C.Clang.Cursor.Typed,                        Language.C.Clang.File,                        Language.C.Clang.Location,                        Language.C.Clang.Token,@@ -44,16 +44,33 @@                        FlexibleContexts   build-depends:       base >=4.8 && <5,                        contravariant >= 1.3.3,-                       inline-c >= 0.5.3.2,+                       inline-c >= 0.5.5.9,                        containers >= 0.5.6.2,                        template-haskell >= 2.10,                        vector >= 0.10.12,                        bytestring >= 0.10.6,-                       stm >= 2.4.4+                       stm >= 2.4.4,+                       singletons >= 2.2,+                       microlens >= 0.4.7.0,+                       microlens-contra >= 0.1.0.1   hs-source-dirs:      src/   build-tools:         hsc2hs   default-language:    Haskell2010   include-dirs:        cbits/   cc-options:          -Wall   extra-libraries:     clang-  ghc-options:         -Wall -O2+  ghc-options:         -Wall -O2 -fno-warn-redundant-constraints++executable find-classes+  main-is:             FindClasses.hs+  build-depends:       base, clang-pure, lens, unordered-containers, hashable, bytestring+  hs-source-dirs:      app+  buildable:           False+  ghc-options:         -Wall -O2 -fno-warn-redundant-constraints -fno-warn-orphans++executable list-fun-types+  main-is:             ListTypes.hs+  build-depends:       base, clang-pure, lens, bytestring+  hs-source-dirs:      examples+  buildable:           False+  ghc-options:         -Wall -O2 -fno-warn-redundant-constraints
+ examples/ListTypes.hs view
@@ -0,0 +1,49 @@+{-+Copyright 2014 Google Inc. All Rights Reserved.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++    http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+-}++{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE TupleSections #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE DataKinds #-}++import           Language.C.Clang+import qualified Language.C.Clang.Cursor as UT+import           Language.C.Clang.Cursor.Typed+import           Data.Foldable+import           Data.Function+import           Control.Lens+import qualified Data.ByteString.Char8 as BS+import           Data.Monoid+import           System.Environment++main :: IO ()+main = do+  args <- getArgs+  case args of+    path : clangArgs -> do+      idx <- createIndex+      tu <- parseTranslationUnit idx path clangArgs+      let funDecs =+            translationUnitCursor tu ^..+              cosmosOnOf cursorChildrenF UT.cursorChildrenF+              . folding (matchKind @'FunctionDecl)+              . to (\fd -> ( cursorSpelling fd, cursorType fd ) )+      for_ funDecs $ \( f, t ) -> putStrLn $ BS.unpack f ++ " :: " ++ BS.unpack (typeSpelling t)++    _ -> putStrLn "usage: list-fun-types path [clang opts]"
src/Language/C/Clang.hs view
@@ -24,7 +24,6 @@   ClangOrd(..)   ) where -import Language.C.Clang.Cursor as C import Language.C.Clang.File as C import Language.C.Clang.Location as C import Language.C.Clang.Token as C
src/Language/C/Clang/Cursor.hs view
@@ -14,8 +14,16 @@ limitations under the License. -} +{-|+Module      :  Language.C.Clang.Cursor+Copyright   :  (C) 2016 Patrick Chilton++If you know what `CursorKind`s you want to operate on,+consider using "Language.C.Clang.Cursor.Typed" instead.+-} module Language.C.Clang.Cursor   ( Cursor()+  , translationUnitCursor   , cursorTranslationUnit   , cursorChildrenF   , cursorChildren@@ -32,9 +40,7 @@ import Language.C.Clang.Internal.FFI import Language.C.Clang.Internal.Types -import Control.Applicative-import Data.Monoid+import Lens.Micro  cursorChildren :: Cursor -> [ Cursor ]-cursorChildren-  = (`appEndo` []) . getConst . cursorChildrenF (\c -> Const $ Endo (c:))+cursorChildren = toListOf cursorChildrenF
+ src/Language/C/Clang/Cursor/Typed.hs view
@@ -0,0 +1,261 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE RankNTypes #-}++{-|+Module      :  Language.C.Clang.Cursor.Typed+Copyright   :  (C) 2016 Patrick Chilton++This module contains a typed version of "Language.C.Clang.Cursor".+Here, we keep track of `CursorKind`s at type-level, which means+that you don't need to check whether a `Cursor` has a given property at runtime.+-}+module Language.C.Clang.Cursor.Typed+  ( Cursor+  , CursorK(..)+  , matchKind++  , translationUnitCursor++  , cursorType++  , cursorChildrenF+  , cursorChildren++  , cursorExtent++  , cursorSpelling++  , HasType+  , HasChildren+  , HasExtent+  , HasSpelling+  , CursorKind(..)+  ) where++import qualified Data.ByteString as BS+import           Data.Functor.Contravariant+import           Data.Maybe+import           Data.Singletons+import           Lens.Micro.Contra++import qualified Language.C.Clang.Cursor as UT+import           Language.C.Clang.Cursor ( cursorKind, Cursor, CursorKind(..) )+import           Language.C.Clang.Location+import           Language.C.Clang.Type+import           Language.C.Clang.TranslationUnit++import           Language.C.Clang.Internal.Types (CursorK(..))++-- | Match a `Cursor` as a particular `CursorKind`. You can use the @TypeApplications@ extension to easily specify the CursorKind you want: @matchKind \@'StructDecl@.+matchKind :: forall kind. SingI kind => Cursor -> Maybe (CursorK kind)+matchKind c+  | cursorKind c == fromSing (sing :: Sing kind) = Just (CursorK c)+  | otherwise = Nothing++translationUnitCursor :: TranslationUnit -> CursorK 'TranslationUnit+translationUnitCursor = CursorK . UT.translationUnitCursor++class HasType (kind :: CursorKind)+cursorType :: HasType kind => CursorK kind -> Type+cursorType = fromJust . UT.cursorType . withoutKind++class HasChildren (kind :: CursorKind)++to :: (s -> a) -> Getter s a+to k f = phantom . f . k++cursorChildrenF :: HasChildren kind => Fold (CursorK kind) Cursor+cursorChildrenF = to withoutKind . UT.cursorChildrenF++cursorChildren :: HasChildren kind => CursorK kind -> [ Cursor ]+cursorChildren = UT.cursorChildren . withoutKind++class HasExtent (kind :: CursorKind)++cursorExtent :: HasExtent kind => CursorK kind -> SourceRange+cursorExtent = fromJust . UT.cursorExtent . withoutKind++class HasSpelling (kind :: CursorKind)++cursorSpelling :: HasSpelling kind => CursorK kind -> BS.ByteString+cursorSpelling = UT.cursorSpelling . withoutKind++-- instances derived experimentally with the find-classes executable+instance HasChildren 'ArraySubscriptExpr+instance HasChildren 'BinaryOperator+instance HasChildren 'CStyleCastExpr+instance HasChildren 'CXXBaseSpecifier+instance HasChildren 'CXXCatchStmt+instance HasChildren 'CXXConstCastExpr+instance HasChildren 'CXXDeleteExpr+instance HasChildren 'CXXDynamicCastExpr+instance HasChildren 'CXXFunctionalCastExpr+instance HasChildren 'CXXNewExpr+instance HasChildren 'CXXReinterpretCastExpr+instance HasChildren 'CXXStaticCastExpr+instance HasChildren 'CXXTryStmt+instance HasChildren 'CaseStmt+instance HasChildren 'ClassTemplate+instance HasChildren 'ClassTemplatePartialSpecialization+instance HasChildren 'CompoundAssignOperator+instance HasChildren 'ConditionalOperator+instance HasChildren 'DeclStmt+instance HasChildren 'DefaultStmt+instance HasChildren 'DoStmt+instance HasChildren 'EnumDecl+instance HasChildren 'ForStmt+instance HasChildren 'FunctionTemplate+instance HasChildren 'IfStmt+instance HasChildren 'InitListExpr+instance HasChildren 'ParenExpr+instance HasChildren 'SwitchStmt+instance HasChildren 'TranslationUnit+instance HasChildren 'UnaryOperator+instance HasChildren 'UnionDecl+instance HasChildren 'UsingDeclaration+instance HasChildren 'UsingDirective+instance HasChildren 'WhileStmt++instance HasType 'ArraySubscriptExpr+instance HasType 'BinaryOperator+instance HasType 'CStyleCastExpr+instance HasType 'CXXBaseSpecifier+instance HasType 'CXXBoolLiteralExpr+instance HasType 'CXXConstCastExpr+instance HasType 'CXXDeleteExpr+instance HasType 'CXXDynamicCastExpr+instance HasType 'CXXFunctionalCastExpr+instance HasType 'CXXMethod+instance HasType 'CXXNewExpr+instance HasType 'CXXReinterpretCastExpr+instance HasType 'CXXStaticCastExpr+instance HasType 'CXXThisExpr+instance HasType 'CXXThrowExpr+instance HasType 'CallExpr+instance HasType 'CharacterLiteral+instance HasType 'ClassDecl+instance HasType 'ClassTemplatePartialSpecialization+instance HasType 'CompoundAssignOperator+instance HasType 'ConditionalOperator+instance HasType 'Constructor+instance HasType 'ConversionFunction+instance HasType 'DeclRefExpr+instance HasType 'Destructor+instance HasType 'EnumConstantDecl+instance HasType 'EnumDecl+instance HasType 'FieldDecl+instance HasType 'FloatingLiteral+instance HasType 'FunctionDecl+instance HasType 'FunctionTemplate+instance HasType 'GNUNullExpr+instance HasType 'InitListExpr+instance HasType 'IntegerLiteral+instance HasType 'MemberRef+instance HasType 'MemberRefExpr+instance HasType 'NonTypeTemplateParameter+instance HasType 'ParenExpr+instance HasType 'ParmDecl+instance HasType 'StringLiteral+instance HasType 'StructDecl+instance HasType 'TemplateTypeParameter+instance HasType 'TypeRef+instance HasType 'TypedefDecl+instance HasType 'UnaryOperator+instance HasType 'UnionDecl+instance HasType 'VarDecl++instance HasExtent 'ArraySubscriptExpr+instance HasExtent 'AsmLabelAttr+instance HasExtent 'BinaryOperator+instance HasExtent 'BreakStmt+instance HasExtent 'CStyleCastExpr+instance HasExtent 'CXXAccessSpecifier+instance HasExtent 'CXXBaseSpecifier+instance HasExtent 'CXXBoolLiteralExpr+instance HasExtent 'CXXCatchStmt+instance HasExtent 'CXXConstCastExpr+instance HasExtent 'CXXDeleteExpr+instance HasExtent 'CXXDynamicCastExpr+instance HasExtent 'CXXFunctionalCastExpr+instance HasExtent 'CXXMethod+instance HasExtent 'CXXNewExpr+instance HasExtent 'CXXReinterpretCastExpr+instance HasExtent 'CXXStaticCastExpr+instance HasExtent 'CXXThisExpr+instance HasExtent 'CXXThrowExpr+instance HasExtent 'CXXTryStmt+instance HasExtent 'CallExpr+instance HasExtent 'CaseStmt+instance HasExtent 'CharacterLiteral+instance HasExtent 'ClassDecl+instance HasExtent 'ClassTemplate+instance HasExtent 'ClassTemplatePartialSpecialization+instance HasExtent 'CompoundAssignOperator+instance HasExtent 'CompoundStmt+instance HasExtent 'ConditionalOperator+instance HasExtent 'ConstAttr+instance HasExtent 'Constructor+instance HasExtent 'ContinueStmt+instance HasExtent 'ConversionFunction+instance HasExtent 'DeclRefExpr+instance HasExtent 'DeclStmt+instance HasExtent 'DefaultStmt+instance HasExtent 'Destructor+instance HasExtent 'DoStmt+instance HasExtent 'EnumConstantDecl+instance HasExtent 'EnumDecl+instance HasExtent 'FloatingLiteral+instance HasExtent 'ForStmt+instance HasExtent 'FunctionDecl+instance HasExtent 'FunctionTemplate+instance HasExtent 'GNUNullExpr+instance HasExtent 'IfStmt+instance HasExtent 'InitListExpr+instance HasExtent 'MemberRef+instance HasExtent 'MemberRefExpr+instance HasExtent 'Namespace+instance HasExtent 'NamespaceRef+instance HasExtent 'NonTypeTemplateParameter+instance HasExtent 'NullStmt+instance HasExtent 'OverloadedDeclRef+instance HasExtent 'ParenExpr+instance HasExtent 'PureAttr+instance HasExtent 'ReturnStmt+instance HasExtent 'StringLiteral+instance HasExtent 'StructDecl+instance HasExtent 'SwitchStmt+instance HasExtent 'TemplateRef+instance HasExtent 'TemplateTypeParameter+instance HasExtent 'TranslationUnit+instance HasExtent 'TypeRef+instance HasExtent 'TypedefDecl+instance HasExtent 'UnaryOperator+instance HasExtent 'UnionDecl+instance HasExtent 'UsingDeclaration+instance HasExtent 'UsingDirective+instance HasExtent 'WhileStmt++instance HasSpelling 'AsmLabelAttr+instance HasSpelling 'CXXBaseSpecifier+instance HasSpelling 'CXXMethod+instance HasSpelling 'ClassDecl+instance HasSpelling 'ClassTemplate+instance HasSpelling 'ClassTemplatePartialSpecialization+instance HasSpelling 'Constructor+instance HasSpelling 'ConversionFunction+instance HasSpelling 'Destructor+instance HasSpelling 'EnumConstantDecl+instance HasSpelling 'FunctionDecl+instance HasSpelling 'FunctionTemplate+instance HasSpelling 'MemberRef+instance HasSpelling 'Namespace+instance HasSpelling 'NamespaceRef+instance HasSpelling 'OverloadedDeclRef+instance HasSpelling 'StringLiteral+instance HasSpelling 'TemplateRef+instance HasSpelling 'TranslationUnit+instance HasSpelling 'TypeRef+instance HasSpelling 'TypedefDecl+instance HasSpelling 'UsingDeclaration
src/Language/C/Clang/Internal/FFI.hsc view
@@ -14,7 +14,8 @@ limitations under the License. -} -{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-overlapping-patterns #-}+{-# LANGUAGE DataKinds #-}  module Language.C.Clang.Internal.FFI where @@ -32,6 +33,7 @@ import qualified Language.C.Inline as CSafe import qualified Language.C.Inline.Unsafe as C import System.IO.Unsafe+import Lens.Micro.Contra  import Language.C.Clang.Internal.Context import Language.C.Clang.Internal.Refs@@ -109,7 +111,7 @@ cursorKind c = uderef c $ fmap parseCursorKind . #peek CXCursor, kind  -- | Fold over the children of a cursor in the `lens` sense.-cursorChildrenF :: (Applicative f, Contravariant f) => (Cursor -> f Cursor) -> (Cursor -> f Cursor)+cursorChildrenF :: Fold Cursor Cursor cursorChildrenF f c = uderef c $ \cp -> do   -- initialize the "Fold state" with no effect   fRef <- newIORef $ phantom $ pure ()@@ -232,6 +234,8 @@ instance Eq Cursor where   (==) = defaultEq $ \lp rp ->     [C.exp| int { clang_equalCursors(*$(CXCursor *lp), *$(CXCursor *rp)) } |]++deriving instance Eq (CursorK kind)  instance Eq SourceRange where   (==) = defaultEq $ \lp rp ->
src/Language/C/Clang/Internal/Types.hs view
@@ -14,8 +14,13 @@ limitations under the License. -} +{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE ExistentialQuantification #-}+ module Language.C.Clang.Internal.Types where +import Data.Singletons.TH import Foreign  import Language.C.Clang.Internal.Refs@@ -43,6 +48,10 @@ newtype Cursor = Cursor (Leaf TranslationUnit CXCursor)   deriving (Child, Clang) +-- | A `Cursor` with a statically known `CursorKind`.+newtype CursorK (kind :: CursorKind) = CursorK { withoutKind :: Cursor }+  deriving (Clang)+ data CXSourceRange type instance RefOf SourceRange = CXSourceRange type instance ParentOf SourceRange = TranslationUnit@@ -267,6 +276,8 @@   | FirstExtraDecl   | LastExtraDecl   deriving (Eq, Ord, Show)++genSingletons [''CursorKind]  data TypeKind   = Invalid
src/Language/C/Clang/TranslationUnit.hs view
@@ -17,7 +17,6 @@ module Language.C.Clang.TranslationUnit   ( TranslationUnit()   , parseTranslationUnit-  , translationUnitCursor   ) where