Package arrow.meta.phases.analysis

Types

AnalysisHandler
Link copied to clipboard
interface AnalysisHandler : ExtensionPhase
CollectAdditionalSources
Link copied to clipboard
interface CollectAdditionalSources : ExtensionPhase
Eq
Link copied to clipboard
interface Eq<A>
ExtraImports
Link copied to clipboard
interface ExtraImports : ExtensionPhase
MetaFileViewProvider
Link copied to clipboard
class MetaFileViewProvider(psiManager: PsiManager, virtualFile: VirtualFile, transformation: (Document?) -> Document?) : SingleRootFileViewProvider

Provides interception access to the internals of a VirtualFile allowing to replace its Document

PreprocessedVirtualFileFactory
Link copied to clipboard
interface PreprocessedVirtualFileFactory : ExtensionPhase

Functions

body
Link copied to clipboard
fun KtDeclarationWithBody.body(): KtExpression?
bodySourceAsExpression
Link copied to clipboard
fun KtExpression.bodySourceAsExpression(): String?
dfs
Link copied to clipboard
fun KtElement.dfs(f: (KtElement) -> Boolean): List<KtElement>
exists
Link copied to clipboard
fun <A> List<A>.exists(f: (A, A) -> Boolean): List<Pair<A, List<A>>>

collects all distinct witnesses of f from the receiver, where the return type contains pairs of A and a list of other corresponding elements that full fill f

getOrCreateBaseDirectory
Link copied to clipboard
fun getOrCreateBaseDirectory(configuration: CompilerConfiguration?): File
intersect
Link copied to clipboard
fun <C : CallableDescriptor> C.intersect(eq: Eq<KotlinType>, types: KotlinBuiltIns.() -> List<KotlinType>): List<KotlinType>

Given eq this function returns KotlinTypes that intersect with the returnType from the list in types. One concrete example for equality on TypeConstructor may look like this:

fun <D : DeclarationDescriptor> D.intersect(eq: Eq<KotlinType>, list: List<KotlinType>, other: KotlinBuiltIns.() -> List<KotlinType>): List<KotlinType>

given eq this function returns a List of KotlinType that are contained by both list and other

isAnnotatedWith
Link copied to clipboard
fun KtAnnotated.isAnnotatedWith(regex: Regex): Boolean
resolveFunctionTypeEq
Link copied to clipboard
fun resolveFunctionTypeEq(): Eq<KotlinType>

defines Equality on types, where FunctionTypes are reduced to their return type

sequence
Link copied to clipboard
fun <A : PsiElement> PsiElement.sequence(on: Class<A>): List<A>

a convenient function that collects all child nodes A starting from this it applies traverseFilter with the identity function

skipGeneration
Link copied to clipboard
fun DeclarationDescriptor.skipGeneration(): Boolean
transform
Link copied to clipboard
fun KtElement.transform(f: (KtElement) -> KtElement?): KtElement
traverseFilter
Link copied to clipboard
fun <A : PsiElement, B : Any> PsiElement.traverseFilter(on: Class<A>, f: (A) -> B?): List<B>

traverse and filters starting from the root node this down to all it's children and applying f

typeConstructorEq
Link copied to clipboard
fun typeConstructorEq(): Eq<KotlinType>

defines Equality on the type constructor

Properties

companionObject
Link copied to clipboard
val KtClass.companionObject: KtObjectDeclaration?
resolveFunctionType
Link copied to clipboard
val resolveFunctionType: (KotlinType) -> KotlinType

resolves FunctionType to it's returnType

returnTypeEq
Link copied to clipboard
val returnTypeEq: Eq<KotlinType>

naive type equality where function types are reduced to their return type