diff --git a/compiler-plugin/src/io/github/kyay10/highkt/HighKTRegistrar.kt b/compiler-plugin/src/io/github/kyay10/highkt/HighKTRegistrar.kt index 4ef7686..e7a3453 100644 --- a/compiler-plugin/src/io/github/kyay10/highkt/HighKTRegistrar.kt +++ b/compiler-plugin/src/io/github/kyay10/highkt/HighKTRegistrar.kt @@ -1,9 +1,5 @@ package io.github.kyay10.highkt -import io.github.kyay10.highkt.fir.AddTypeAssertTransformer -import io.github.kyay10.highkt.fir.AddTypeToTypeAssertTransformer -import io.github.kyay10.highkt.fir.HighKTCheckers -import io.github.kyay10.highkt.fir.KindExpectedTypeCanonicalizer import io.github.kyay10.highkt.fir.KindReturnTypeRefiner import org.jetbrains.kotlin.fir.extensions.FirExtensionApiInternals import org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrar @@ -11,10 +7,6 @@ import org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrar class HighKTRegistrar : FirExtensionRegistrar() { @OptIn(FirExtensionApiInternals::class) override fun ExtensionRegistrarContext.configurePlugin() { - +::AddTypeAssertTransformer - +::AddTypeToTypeAssertTransformer +::KindReturnTypeRefiner - +::KindExpectedTypeCanonicalizer - +::HighKTCheckers } } \ No newline at end of file diff --git a/compiler-plugin/src/io/github/kyay10/highkt/fir/AddTypeAssertTransformer.kt b/compiler-plugin/src/io/github/kyay10/highkt/fir/AddTypeAssertTransformer.kt deleted file mode 100644 index 178ecda..0000000 --- a/compiler-plugin/src/io/github/kyay10/highkt/fir/AddTypeAssertTransformer.kt +++ /dev/null @@ -1,252 +0,0 @@ -package io.github.kyay10.highkt.fir - -import org.jetbrains.kotlin.fir.FirElement -import org.jetbrains.kotlin.fir.FirSession -import org.jetbrains.kotlin.fir.SessionHolder -import org.jetbrains.kotlin.fir.declarations.FirAnonymousFunction -import org.jetbrains.kotlin.fir.declarations.FirDeclaration -import org.jetbrains.kotlin.fir.declarations.FirFunction -import org.jetbrains.kotlin.fir.declarations.FirProperty -import org.jetbrains.kotlin.fir.declarations.FirReceiverParameter -import org.jetbrains.kotlin.fir.declarations.FirVariable -import org.jetbrains.kotlin.fir.declarations.utils.isDelegatedProperty -import org.jetbrains.kotlin.fir.declarations.utils.isInline -import org.jetbrains.kotlin.fir.expressions.FirFunctionCall -import org.jetbrains.kotlin.fir.expressions.FirLazyBlock -import org.jetbrains.kotlin.fir.expressions.FirPropertyAccessExpression -import org.jetbrains.kotlin.fir.expressions.FirStatement -import org.jetbrains.kotlin.fir.expressions.FirVariableAssignment -import org.jetbrains.kotlin.fir.expressions.UnresolvedExpressionTypeAccess -import org.jetbrains.kotlin.fir.expressions.arguments -import org.jetbrains.kotlin.fir.expressions.builder.FirFunctionCallBuilder -import org.jetbrains.kotlin.fir.expressions.builder.buildArgumentList -import org.jetbrains.kotlin.fir.expressions.builder.buildBlock -import org.jetbrains.kotlin.fir.expressions.builder.buildFunctionCall -import org.jetbrains.kotlin.fir.expressions.builder.buildFunctionCallCopy -import org.jetbrains.kotlin.fir.expressions.builder.buildPropertyAccessExpression -import org.jetbrains.kotlin.fir.expressions.builder.buildThisReceiverExpression -import org.jetbrains.kotlin.fir.expressions.builder.buildVariableAssignment -import org.jetbrains.kotlin.fir.expressions.impl.FirContractCallBlock -import org.jetbrains.kotlin.fir.expressions.impl.FirEmptyExpressionBlock -import org.jetbrains.kotlin.fir.expressions.impl.FirSingleExpressionBlock -import org.jetbrains.kotlin.fir.extensions.FirAssignExpressionAltererExtension -import org.jetbrains.kotlin.fir.extensions.FirExtensionApiInternals -import org.jetbrains.kotlin.fir.extensions.FirStatusTransformerExtension -import org.jetbrains.kotlin.fir.references.builder.buildExplicitThisReference -import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference -import org.jetbrains.kotlin.fir.references.builder.buildSimpleNamedReference -import org.jetbrains.kotlin.fir.references.resolved -import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol -import org.jetbrains.kotlin.fir.types.FirImplicitTypeRef -import org.jetbrains.kotlin.fir.types.builder.buildTypeProjectionWithVariance -import org.jetbrains.kotlin.fir.types.coneType -import org.jetbrains.kotlin.fir.types.coneTypeOrNull -import org.jetbrains.kotlin.fir.types.isNonReflectFunctionType -import org.jetbrains.kotlin.fir.types.withReplacedConeType -import org.jetbrains.kotlin.fir.visitors.FirVisitorVoid -import org.jetbrains.kotlin.types.Variance - -// object AddedRunForFixAll : GeneratedDeclarationKey() - -class AddTypeAssertTransformer(session: FirSession) : FirStatusTransformerExtension(session), SessionHolder { - @OptIn(UnresolvedExpressionTypeAccess::class) - override fun needTransformStatus(declaration: FirDeclaration): Boolean { - val body = (declaration as? FirFunction)?.body - if (body != null && body !is FirEmptyExpressionBlock && body !is FirLazyBlock && body.statements.isNotEmpty()) { - if (body is FirSingleExpressionBlock && declaration.returnTypeRef is FirImplicitTypeRef) { - // TODO can this be done? - /* declaration.replaceBody(FirSingleExpressionBlock(buildReturnExpression { - source = body.statement.source - target = FirFunctionTarget(labelName = null, isLambda = false).apply { - bind(declaration) - } - result = buildFunctionCall { - calleeReference = buildSimpleNamedReference { - name = Name.identifier("run") - } - explicitReceiver = buildPropertyAccessExpression { - calleeReference = buildSimpleNamedReference { - name = KOTLIN_NAME - } - } - argumentList = buildArgumentList { - arguments.add(buildAnonymousFunctionExpression { - anonymousFunction = buildAnonymousFunction { - moduleData = declaration.moduleData - origin = FirDeclarationOrigin.Plugin(AddedRunForFixAll) - returnTypeRef = session.builtinTypes.nothingType - symbol = FirAnonymousFunctionSymbol() - isLambda = true - hasExplicitParameterList = false - body = TODO() - } - }) - } - } - })) */ - } else { - declaration.replaceBody(buildBlock { - coneTypeOrNull = body.coneTypeOrNull - for (valueParam in declaration.contextParameters + declaration.valueParameters) { - // TODO handle untyped lambda parameters - if (valueParam.returnTypeRef.coneTypeOrNull?.isNonReflectFunctionType(session) == true && declaration.isInline && !valueParam.isNoinline) continue - val newTypes = - valueParam.returnTypeRef.coneTypeOrNull?.applyKAndCanonicalizeList().orEmpty().ifEmpty { continue } - statements.add(valueParam.buildTypeAssertCall { - typeArguments += newTypes.map { - buildTypeProjectionWithVariance { - source = valueParam.source - typeRef = valueParam.returnTypeRef.withReplacedConeType(it) - variance = Variance.INVARIANT - } - } - }) - } - declaration.receiverParameter?.let { receiverParam -> - // TODO handle untyped lambda receivers - val newType = - receiverParam.typeRef.coneTypeOrNull?.applyKAndCanonicalizeList().orEmpty().ifEmpty { return@let } - statements.add(receiverParam.buildTypeAssertCall { - typeArguments += newType.map { - buildTypeProjectionWithVariance { - source = receiverParam.source - typeRef = receiverParam.typeRef.withReplacedConeType(it) - variance = Variance.INVARIANT - } - } - }) - } - if (body.statements.first() is FirContractCallBlock) { - statements.add(0, body.statements.first()) - statements.addAll(body.statements.drop(1)) - } else { - statements.addAll(body.statements) - } - val iterator = statements.listIterator() - for (statement in iterator) { - if (statement is FirProperty && statement.initializer != null && !statement.isDelegatedProperty && !statement.name.isSpecial) { - val propertyType = statement.returnTypeRef.coneTypeOrNull - val newTypes = propertyType?.applyKAndCanonicalizeList().orEmpty() - if (newTypes.isNotEmpty()) iterator.add(statement.buildTypeAssertCall { - typeArguments += newTypes.map { - buildTypeProjectionWithVariance { - source = statement.source - typeRef = statement.returnTypeRef.withReplacedConeType(it) - variance = Variance.INVARIANT - } - } - }) - else if (propertyType == null) iterator.add(buildVariableAssignment { - source = statement.source - lValue = buildPropertyAccessExpression { - source = statement.source - calleeReference = buildResolvedNamedReference { - source = statement.source - name = statement.name - resolvedSymbol = statement.symbol - } - } - rValue = statement.buildTypeAssertCall { } - }) - } - } - }) - } - declaration.acceptChildren(object : FirVisitorVoid() { - override fun visitElement(element: FirElement) { - element.acceptChildren(this) - } - - override fun visitAnonymousFunction(anonymousFunction: FirAnonymousFunction) { - needTransformStatus(anonymousFunction) - } - - override fun visitFunction(function: FirFunction) {} // Don't go into nested named functions - }) - } - return false - } -} - -@OptIn(FirExtensionApiInternals::class) -class AddTypeToTypeAssertTransformer(session: FirSession) : FirAssignExpressionAltererExtension(session), - SessionHolder { - override fun transformVariableAssignment(variableAssignment: FirVariableAssignment): FirStatement? { - val typeAssertion = variableAssignment.rValue - if (typeAssertion !is FirFunctionCall || typeAssertion.calleeReference.name != ASSERT_IS_TYPE) return null - val property = - (typeAssertion.arguments.single() as FirPropertyAccessExpression).calleeReference.resolved!!.resolvedSymbol as FirPropertySymbol - val newTypes = - property.resolvedReturnType.applyKAndCanonicalizeList().ifEmpty { return FirEmptyExpressionBlock() } - return buildFunctionCallCopy(typeAssertion) { - typeArguments += newTypes.map { - buildTypeProjectionWithVariance { - source = typeAssertion.source - typeRef = property.resolvedReturnTypeRef.withReplacedConeType(it) - variance = Variance.INVARIANT - } - } - } - } -} - -context(c: SessionHolder) -private inline fun FirReceiverParameter.buildTypeAssertCall( - block: FirFunctionCallBuilder.() -> Unit -): FirFunctionCall = buildTypeAssertCallBasic { - argumentList = buildArgumentList { - source = this@buildTypeAssertCall.source - arguments.add(buildThisReceiverExpression { - source = this@buildTypeAssertCall.source - coneTypeOrNull = typeRef.coneType - calleeReference = buildExplicitThisReference { - source = this@buildTypeAssertCall.source - }.apply { - replaceBoundSymbol(symbol) - } - }) - } - block() -} - -context(c: SessionHolder) -private inline fun FirVariable.buildTypeAssertCall( - block: FirFunctionCallBuilder.() -> Unit -): FirFunctionCall = buildTypeAssertCallBasic { - argumentList = buildArgumentList { - source = this@buildTypeAssertCall.source - arguments.add(buildPropertyAccessExpression { - source = this@buildTypeAssertCall.source - coneTypeOrNull = returnTypeRef.coneTypeOrNull - calleeReference = buildResolvedNamedReference { - source = this@buildTypeAssertCall.source - name = this@buildTypeAssertCall.name - resolvedSymbol = symbol - } - }) - } - block() -} - -context(c: SessionHolder) -private inline fun FirElement.buildTypeAssertCallBasic( - block: FirFunctionCallBuilder.() -> Unit -): FirFunctionCall = buildFunctionCall { - source = this@buildTypeAssertCallBasic.source - coneTypeOrNull = c.session.builtinTypes.unitType.coneType - calleeReference = buildSimpleNamedReference { - source = this@buildTypeAssertCallBasic.source - name = ASSERT_IS_TYPE - } - explicitReceiver = PACKAGE_FQN.pathSegments().fold(null) { acc, name -> - buildPropertyAccessExpression { - source = this@buildTypeAssertCallBasic.source - calleeReference = buildSimpleNamedReference { - source = this@buildTypeAssertCallBasic.source - this.name = name - } - explicitReceiver = acc - } - } - block() -} \ No newline at end of file diff --git a/compiler-plugin/src/io/github/kyay10/highkt/fir/ExpandedTypeAttribute.kt b/compiler-plugin/src/io/github/kyay10/highkt/fir/ExpandedTypeAttribute.kt new file mode 100644 index 0000000..7568980 --- /dev/null +++ b/compiler-plugin/src/io/github/kyay10/highkt/fir/ExpandedTypeAttribute.kt @@ -0,0 +1,39 @@ +package io.github.kyay10.highkt.fir + +import org.jetbrains.kotlin.fir.types.ConeAttribute +import org.jetbrains.kotlin.fir.types.ConeAttributeWithConeType +import org.jetbrains.kotlin.fir.types.ConeAttributes +import org.jetbrains.kotlin.fir.types.ConeKotlinType +import org.jetbrains.kotlin.fir.types.renderForDebugging +import org.jetbrains.kotlin.fir.types.renderReadable + +class ExpandedTypeAttribute(override val coneType: ConeKotlinType) : ConeAttributeWithConeType() { + override fun copyWith(newType: ConeKotlinType) = + ExpandedTypeAttribute(coneType = newType) + override fun add(other: ExpandedTypeAttribute?) = other ?: this + override fun intersect(other: ExpandedTypeAttribute?) = other ?: this + override fun isSubtypeOf(other: ExpandedTypeAttribute?) = true + override fun renderForReadability() = "${coneType.renderReadable()} ~> " + override fun toString(): String = "{${coneType.renderForDebugging()} ~>}" + override fun union(other: ExpandedTypeAttribute?) = other ?: this + override val keepInInferredDeclarationType get() = true + override val key get() = ExpandedTypeAttribute::class +} + +val ConeAttributes.expandedType by ConeAttributes.attributeAccessor() + +data object LeaveUnevaluatedAttribute : ConeAttribute() { + override fun add(other: LeaveUnevaluatedAttribute?) = other ?: this + override fun intersect(other: LeaveUnevaluatedAttribute?) = other ?: this + + override fun isSubtypeOf(other: LeaveUnevaluatedAttribute?) = true + + override fun union(other: LeaveUnevaluatedAttribute?) = other ?: this + override val key = LeaveUnevaluatedAttribute::class + override val keepInInferredDeclarationType: Boolean get() = false + override fun renderForReadability() = "[LeaveUnevaluated]" + override fun toString(): String = "{LeaveUnevaluated}" +} + +val ConeAttributes.leaveUnevaluated by ConeAttributes.attributeAccessor() +val ConeAttributes.shouldLeaveUnevaluated get() = this.leaveUnevaluated != null \ No newline at end of file diff --git a/compiler-plugin/src/io/github/kyay10/highkt/fir/HighKTCheckers.kt b/compiler-plugin/src/io/github/kyay10/highkt/fir/HighKTCheckers.kt deleted file mode 100644 index 77b6ed0..0000000 --- a/compiler-plugin/src/io/github/kyay10/highkt/fir/HighKTCheckers.kt +++ /dev/null @@ -1,104 +0,0 @@ -package io.github.kyay10.highkt.fir - -import io.github.kyay10.highkt.fir.HighKTErrors.EXPAND_TO_MISMATCH -import org.jetbrains.kotlin.diagnostics.DiagnosticReporter -import org.jetbrains.kotlin.diagnostics.KtDiagnosticFactory3 -import org.jetbrains.kotlin.diagnostics.KtDiagnosticFactoryToRendererMap -import org.jetbrains.kotlin.diagnostics.KtDiagnosticsContainer -import org.jetbrains.kotlin.diagnostics.Severity.ERROR -import org.jetbrains.kotlin.diagnostics.SourceElementPositioningStrategies -import org.jetbrains.kotlin.diagnostics.rendering.BaseDiagnosticRendererFactory -import org.jetbrains.kotlin.diagnostics.reportOn -import org.jetbrains.kotlin.fir.FirSession -import org.jetbrains.kotlin.fir.SessionHolder -import org.jetbrains.kotlin.fir.analysis.checkers.MppCheckerKind -import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.analysis.checkers.expression.ExpressionCheckers -import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirBasicExpressionChecker -import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirFunctionCallChecker -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.RENDER_TYPE -import org.jetbrains.kotlin.fir.analysis.extensions.FirAdditionalCheckersExtension -import org.jetbrains.kotlin.fir.expressions.FirFunctionCall -import org.jetbrains.kotlin.fir.expressions.FirResolvable -import org.jetbrains.kotlin.fir.expressions.FirStatement -import org.jetbrains.kotlin.fir.references.FirResolvedErrorReference -import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference -import org.jetbrains.kotlin.fir.references.resolved -import org.jetbrains.kotlin.fir.references.toResolvedCallableSymbol -import org.jetbrains.kotlin.fir.resolve.diagnostics.ConeConstraintSystemHasContradiction -import org.jetbrains.kotlin.fir.types.ConeKotlinType -import org.jetbrains.kotlin.fir.types.resolvedType -import org.jetbrains.kotlin.psi.KtCallExpression -import org.jetbrains.kotlin.resolve.calls.inference.model.InferredEmptyIntersectionWarning - -class HighKTCheckers(session: FirSession) : FirAdditionalCheckersExtension(session), SessionHolder { - override val expressionCheckers: ExpressionCheckers - get() = object : ExpressionCheckers() { - override val basicExpressionCheckers = setOf(ReplaceErrorRefEmptyIntersectionChecker) - override val functionCallCheckers = setOf(ExpandToCallChecker) - } -} - -private object ExpandToCallChecker : FirFunctionCallChecker(MppCheckerKind.Common) { - context(context: CheckerContext, reporter: DiagnosticReporter) - override fun check(expression: FirFunctionCall) { - if (expression.calleeReference.resolved?.toResolvedCallableSymbol()?.callableId != EXPAND_TO_ID) return - val receiver = expression.explicitReceiver ?: return - if (!receiver.resolvedType.expandsTo(expression.resolvedType)) reporter.reportOn( - expression.source, - EXPAND_TO_MISMATCH, - receiver.resolvedType, - expression.resolvedType, - expression.resolvedType.applyKOrSelf(), - ) - } -} - -private object ReplaceErrorRefEmptyIntersectionChecker : FirBasicExpressionChecker(MppCheckerKind.Common) { - context(context: CheckerContext, reporter: DiagnosticReporter) - override fun check(expression: FirStatement) { - if (expression is FirResolvable) expression.replaceEmptyIntersectionErrorReference() - } -} - -context(_: SessionHolder) -private fun FirResolvable.replaceEmptyIntersectionErrorReference() { - val errorRef = calleeReference as? FirResolvedErrorReference ?: return - val diagnostic = errorRef.diagnostic as? ConeConstraintSystemHasContradiction ?: return - if (diagnostic.candidate.errors.any { error -> - error !is InferredEmptyIntersectionWarning || - diagnostic.candidate.system.getEmptyIntersectionTypeKind( - error.incompatibleTypes.mapNotNull { (it as? ConeKotlinType)?.applyKOrSelf() } - ) != null - }) return - replaceCalleeReference(buildResolvedNamedReference { - source = errorRef.source - name = errorRef.name - resolvedSymbol = errorRef.resolvedSymbol - resolvedSymbolOrigin = errorRef.resolvedSymbolOrigin - }) -} - -private object HighKTErrors : KtDiagnosticsContainer() { - val EXPAND_TO_MISMATCH: KtDiagnosticFactory3 = KtDiagnosticFactory3( - "EXPAND_TO_MISMATCH", - ERROR, - SourceElementPositioningStrategies.DEFAULT, - KtCallExpression::class, - getRendererFactory() - ) - - override fun getRendererFactory(): BaseDiagnosticRendererFactory = HighKTErrorsDefaultMessages -} - -private object HighKTErrorsDefaultMessages : BaseDiagnosticRendererFactory() { - override val MAP: KtDiagnosticFactoryToRendererMap by KtDiagnosticFactoryToRendererMap("FIR") { map -> - map.put( - EXPAND_TO_MISMATCH, - "Type {0} does not expand to {1}, since the latter contracts to {2}", - RENDER_TYPE, - RENDER_TYPE, - RENDER_TYPE - ) - } -} \ No newline at end of file diff --git a/compiler-plugin/src/io/github/kyay10/highkt/fir/KindReturnTypeRefiner.kt b/compiler-plugin/src/io/github/kyay10/highkt/fir/KindReturnTypeRefiner.kt index 67eb9de..4641089 100644 --- a/compiler-plugin/src/io/github/kyay10/highkt/fir/KindReturnTypeRefiner.kt +++ b/compiler-plugin/src/io/github/kyay10/highkt/fir/KindReturnTypeRefiner.kt @@ -1,282 +1,180 @@ package io.github.kyay10.highkt.fir -import arrow.core.raise.merge -import org.jetbrains.kotlin.KtSourceElement -import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.SessionAndScopeSessionHolder +import org.jetbrains.kotlin.fir.SessionConfiguration import org.jetbrains.kotlin.fir.SessionHolder -import org.jetbrains.kotlin.fir.expressions.FirAnonymousFunctionExpression -import org.jetbrains.kotlin.fir.expressions.FirBlock -import org.jetbrains.kotlin.fir.expressions.FirCatch -import org.jetbrains.kotlin.fir.expressions.FirElvisExpression -import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirFunctionCall -import org.jetbrains.kotlin.fir.expressions.FirImplicitInvokeCall -import org.jetbrains.kotlin.fir.expressions.FirNamedArgumentExpression -import org.jetbrains.kotlin.fir.expressions.FirReturnExpression -import org.jetbrains.kotlin.fir.expressions.FirSafeCallExpression -import org.jetbrains.kotlin.fir.expressions.FirTryExpression -import org.jetbrains.kotlin.fir.expressions.FirVariableAssignment -import org.jetbrains.kotlin.fir.expressions.FirWhenBranch -import org.jetbrains.kotlin.fir.expressions.FirWhenExpression -import org.jetbrains.kotlin.fir.expressions.UnresolvedExpressionTypeAccess -import org.jetbrains.kotlin.fir.expressions.arguments import org.jetbrains.kotlin.fir.extensions.FirExpressionResolutionExtension -import org.jetbrains.kotlin.fir.extensions.FirExtensionApiInternals -import org.jetbrains.kotlin.fir.extensions.FirFunctionCallRefinementExtension -import org.jetbrains.kotlin.fir.references.resolved -import org.jetbrains.kotlin.fir.references.symbol -import org.jetbrains.kotlin.fir.references.toResolvedCallableSymbol -import org.jetbrains.kotlin.fir.resolve.calls.ConeResolvedLambdaAtom +import org.jetbrains.kotlin.fir.languageVersionSettings import org.jetbrains.kotlin.fir.resolve.calls.ImplicitExtensionReceiverValue -import org.jetbrains.kotlin.fir.resolve.calls.candidate.CallInfo -import org.jetbrains.kotlin.fir.resolve.calls.candidate.FirNamedReferenceWithCandidate -import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBodyResolveTransformer +import org.jetbrains.kotlin.fir.resolve.inference.InferenceComponents +import org.jetbrains.kotlin.fir.resolve.toSymbol +import org.jetbrains.kotlin.fir.scopes.FirOverrideChecker +import org.jetbrains.kotlin.fir.scopes.impl.FirStandardOverrideChecker import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.SymbolInternals -import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol -import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol -import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol +import org.jetbrains.kotlin.fir.symbols.impl.ConeClassLikeLookupTagImpl +import org.jetbrains.kotlin.fir.types.ConeClassLikeLookupTag +import org.jetbrains.kotlin.fir.types.ConeClassLikeType +import org.jetbrains.kotlin.fir.types.ConeInferenceContext import org.jetbrains.kotlin.fir.types.ConeKotlinType -import org.jetbrains.kotlin.fir.types.ConeTypeIntersector -import org.jetbrains.kotlin.fir.types.ConeTypeVariableType -import org.jetbrains.kotlin.fir.types.coneTypeOrNull -import org.jetbrains.kotlin.fir.types.typeContext -import org.jetbrains.kotlin.fir.types.withReplacedReturnType -import org.jetbrains.kotlin.fir.visitors.FirDefaultVisitor -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintKind -import org.jetbrains.kotlin.types.AbstractTypeChecker +import org.jetbrains.kotlin.fir.types.ConeRigidType +import org.jetbrains.kotlin.fir.types.ConeTypeApproximator +import org.jetbrains.kotlin.fir.types.ConeTypePreparator +import org.jetbrains.kotlin.fir.types.TypeComponents +import org.jetbrains.kotlin.fir.types.correspondingSupertypesCache +import org.jetbrains.kotlin.fir.types.getConstructor +import org.jetbrains.kotlin.fir.types.replaceType +import org.jetbrains.kotlin.fir.types.resolvedType +import org.jetbrains.kotlin.fir.types.type +import org.jetbrains.kotlin.fir.types.variance +import org.jetbrains.kotlin.fir.types.withArguments +import org.jetbrains.kotlin.fir.types.withAttributes +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.types.AbstractTypeRefiner +import org.jetbrains.kotlin.types.TypeCheckerState +import org.jetbrains.kotlin.types.TypeRefinement +import org.jetbrains.kotlin.types.Variance +import org.jetbrains.kotlin.types.model.AnnotationMarker +import org.jetbrains.kotlin.types.model.KotlinTypeMarker +import org.jetbrains.kotlin.types.model.RigidTypeMarker +import org.jetbrains.kotlin.types.model.TypeArgumentMarker +import org.jetbrains.kotlin.types.model.TypeConstructorMarker + +private val UNSAFE = Class.forName("sun.misc.Unsafe").getDeclaredField("theUnsafe").apply { isAccessible = true } + .get(null) as sun.misc.Unsafe + +private val typeContextField = TypeComponents::class.java.getDeclaredField("typeContext").apply { + isAccessible = true +} + +private val typeApproximatorField = TypeComponents::class.java.getDeclaredField("typeApproximator").apply { + isAccessible = true +} +@OptIn(SessionConfiguration::class) class KindReturnTypeRefiner(session: FirSession) : FirExpressionResolutionExtension(session), SessionHolder { - override fun addNewImplicitReceivers( - functionCall: FirFunctionCall, - sessionHolder: SessionAndScopeSessionHolder, - containingCallableSymbol: FirCallableSymbol<*> - ) = addNewImplicitReceivers(functionCall, sessionHolder, containingCallableSymbol as FirBasedSymbol<*>) + init { + session.register(TypeComponents::class, TypeComponents(KindInferenceContext(session))) + session.register(InferenceComponents::class, InferenceComponents(session)) + session.register(FirOverrideChecker::class, FirStandardOverrideChecker(session)) + } @OptIn(SymbolInternals::class) - fun addNewImplicitReceivers( + override fun addNewImplicitReceivers( functionCall: FirFunctionCall, sessionHolder: SessionAndScopeSessionHolder, containingCallableSymbol: FirBasedSymbol<*> ): List { - sessionHolder as FirAbstractBodyResolveTransformer.BodyResolveTransformerComponents - if (functionCall.calleeReference.resolved?.toResolvedCallableSymbol()?.callableId != EXPAND_TO_ID) { - val expectedType = functionCall.expectedType(sessionHolder.file.symbol) - functionCall.transformConeType { - val newType = it.applyKOrSelf() - if (expectedType != null && expectedType.isK() && newType expandsTo expectedType) expectedType - else newType.canonicalize(expectedType.isK()) - } - } + // TODO figure out how to make resolution see the member scopes of K types so that this is unnecessary + functionCall.replaceConeTypeOrNull(functionCall.resolvedType.applyKOrSelf()) return emptyList() } } -@OptIn(FirExtensionApiInternals::class) -class KindExpectedTypeCanonicalizer(session: FirSession) : FirFunctionCallRefinementExtension(session), SessionHolder { - override fun anchorElement(symbol: FirRegularClassSymbol): KtSourceElement { - error("unreachable") - } - - @OptIn(UnresolvedExpressionTypeAccess::class) - override fun intercept( - callInfo: CallInfo, - symbol: FirNamedFunctionSymbol - ): CallReturnType? { - // TODO restore original type upon successive calls - val valueParameterSymbols = symbol.valueParameterSymbols - val receiverType = symbol.resolvedReceiverType ?: symbol.dispatchReceiverType - val indexOfLastPositionalArgument = callInfo.arguments.indexOfLast { it !is FirNamedArgumentExpression } - val positionalArguments = callInfo.arguments.subList(0, indexOfLastPositionalArgument + 1) - - @Suppress("UNCHECKED_CAST") - val namedArguments = callInfo.arguments.subList( - indexOfLastPositionalArgument + 1, - callInfo.arguments.size - ) as List - for (namedArgument in namedArguments) { - val expectedType = - valueParameterSymbols.find { it.name == namedArgument.name }?.resolvedReturnType ?: continue - namedArgument.expression.transformConeType { it.canonicalize(expectedType.isK()) } - } - val parameterIterator = valueParameterSymbols.listIterator() - for (argument in positionalArguments) { - if (!parameterIterator.hasPrevious() || !parameterIterator.previous().isVararg) { - if (!parameterIterator.hasNext()) break - parameterIterator.next() - } - (if (argument is FirNamedArgumentExpression) argument.expression else argument).transformConeType { - it.canonicalize(parameterIterator.previous().resolvedReturnType.isK()) - } - } - callInfo.explicitReceiver?.transformConeType { it.canonicalize(receiverType.isK()) } - return null +private fun TypeComponents(inferenceContext: ConeInferenceContext): TypeComponents = with(inferenceContext.session) { + (UNSAFE.allocateInstance(TypeComponents::class.java) as TypeComponents).apply { + typeContextField.set(this, inferenceContext) + typeApproximatorField.set(this, ConeTypeApproximator(inferenceContext, languageVersionSettings)) } +} - override fun ownsSymbol(symbol: FirRegularClassSymbol): Boolean { - error("unreachable") - } +class ConeClassLikeLookupTagWithType(val underlying: ConeClassLikeLookupTag, val type: ConeRigidType) : ConeClassLikeLookupTag() { + override val classId: ClassId get() = underlying.classId + override fun equals(other: Any?) = (other is ConeClassLikeLookupTag) && this.classId == other.classId + override fun hashCode(): Int = underlying.hashCode() +} - override fun restoreSymbol( - call: FirFunctionCall, - name: Name - ): FirRegularClassSymbol? { - error("unreachable") +class KindInferenceContext(override val session: FirSession) : ConeInferenceContext, SessionHolder { + private val underlying = object: ConeInferenceContext { override val session = this@KindInferenceContext.session } + private fun TypeConstructorMarker.normalize() = if (this is ConeClassLikeLookupTagWithType) this.underlying else this + override fun TypeConstructorMarker.parametersCount() = with(underlying) { normalize().parametersCount() } + override fun TypeConstructorMarker.isLocalType() = with(underlying) { normalize().isLocalType() } + override fun TypeConstructorMarker.toClassLikeSymbol() = with(underlying) { normalize().toClassLikeSymbol() } + override fun TypeConstructorMarker.supertypes() = with(underlying) { normalize().supertypes() } + override fun createSimpleType( + constructor: TypeConstructorMarker, + arguments: List, + nullable: Boolean, + isExtensionFunction: Boolean, + contextParameterCount: Int, + attributes: List? + ) = with(underlying) { + createSimpleType( + constructor.normalize(), + arguments, + nullable, + isExtensionFunction, + contextParameterCount, + attributes + ) } - override fun transform( - call: FirFunctionCall, - originalSymbol: FirNamedFunctionSymbol - ): FirFunctionCall { - error("unreachable") - } -} + override fun areEqualTypeConstructors( + c1: TypeConstructorMarker, + c2: TypeConstructorMarker + ) = with(underlying) { areEqualTypeConstructors(c1.normalize(), c2.normalize()) } -@OptIn(SymbolInternals::class) -context(c: SessionHolder) -private fun FirFunctionCall.expectedType(containingCallableSymbol: FirBasedSymbol<*>): ConeKotlinType? = merge { - containingCallableSymbol.fir.accept(object : FirDefaultVisitor() { - override fun visitElement( - element: FirElement, - data: ConeKotlinType? - ) { - if (element is FirExpression && matches(element)) { - raise(data) - } - if (element is FirFunctionCall) { - val calleeReference = element.calleeReference - if (calleeReference is FirNamedReferenceWithCandidate) { - element.explicitReceiver?.accept(this, null) - element.arguments.forEach { arg -> - val atom = - calleeReference.candidate.postponedAtoms.find { it.expression == arg } ?: return@forEach arg.accept( - this, - null - ) - val previousFlag = AbstractTypeChecker.RUN_SLOW_ASSERTIONS - AbstractTypeChecker.RUN_SLOW_ASSERTIONS = false - if (atom is ConeResolvedLambdaAtom) { - val returnType = atom.returnType - atom.expression.anonymousFunction.body?.accept( - this, - if (returnType is ConeTypeVariableType) calleeReference.candidate.system.notFixedTypeVariables[returnType.typeConstructor]?.let { - val uppers = it.constraints.filter { it.kind == ConstraintKind.UPPER }.mapNotNull { it.type as? ConeKotlinType } - if (uppers.isNotEmpty()) ConeTypeIntersector.intersectTypes(c.session.typeContext, uppers) else null - } ?: returnType else returnType) - } else arg.accept(this, atom.expectedType) // TODO untested - AbstractTypeChecker.RUN_SLOW_ASSERTIONS = previousFlag - return - } - } - } - element.acceptChildren(this, null) - } - - override fun visitReturnExpression( - returnExpression: FirReturnExpression, - data: ConeKotlinType? - ) { - returnExpression.acceptChildren(this, returnExpression.target.labeledElement.returnTypeRef.coneTypeOrNull) + override fun RigidTypeMarker.typeConstructor(): TypeConstructorMarker { + require(this is ConeRigidType) + return when(val constructor = getConstructor()) { + is ConeClassLikeLookupTagImpl -> ConeClassLikeLookupTagWithType(constructor, this) + else -> constructor } + } - override fun visitBlock( - block: FirBlock, - data: ConeKotlinType? - ) { - val statements = block.statements.ifEmpty { return } - for (statement in statements.dropLast(1)) { - statement.accept(this, null) + override fun newTypeCheckerState( + errorTypesEqualToAnything: Boolean, + stubTypesEqualToAnything: Boolean, + dnnTypesEqualToFlexible: Boolean, + ): TypeCheckerState = TypeCheckerState( + errorTypesEqualToAnything, + stubTypesEqualToAnything, + dnnTypesEqualToFlexible, + allowedTypeVariable = true, + typeSystemContext = this, + kotlinTypePreparator = ConeTypePreparator(session), + kotlinTypeRefiner = KindTypeRefiner(session) + ) + + private fun ConeKotlinType.cachedCorrespondingSupertypes(constructor: TypeConstructorMarker) = + session.correspondingSupertypesCache.getCorrespondingSupertypes(this, constructor) + + private fun ConeKotlinType.options(): List = + listOfNotNull(attributes.expandedType?.coneType, toCanonicalKType(), this) + + override fun RigidTypeMarker.fastCorrespondingSupertypes(constructor: TypeConstructorMarker): List? { + val superType = (constructor as? ConeClassLikeLookupTagWithType)?.type + val constructor = constructor.normalize() + require(this is ConeKotlinType) + if ((constructor as? ConeClassLikeLookupTag)?.classId != K_CLASS_ID) { + val superTypes = cachedCorrespondingSupertypes(constructor) + return if (superType == null) superTypes else superTypes?.map { + var replacedAny = false + var i = 0 + it.withArguments { arg -> + val expectedArg = superType.typeArguments[i++] + if (expectedArg.type.isK && arg.variance != Variance.OUT_VARIANCE && !arg.type.isK) { + val replacement = arg.type?.options()?.first() + if (replacement !== arg.type) { + replacedAny = true + arg.replaceType(replacement?.withAttributes(replacement.attributes.add(LeaveUnevaluatedAttribute))) + } else arg + } else arg + }.takeIf { replacedAny } ?: it } - statements.last().accept(this, data) - } - - override fun visitWhenExpression( - whenExpression: FirWhenExpression, - data: ConeKotlinType? - ) { - whenExpression.calleeReference.accept(this, null) - whenExpression.subjectVariable?.accept(this, null) - whenExpression.branches.forEach { it.accept(this, data) } - } - - override fun visitWhenBranch( - whenBranch: FirWhenBranch, - data: ConeKotlinType? - ) { - whenBranch.condition.accept(this, null) - whenBranch.result.accept(this, data) - } - - override fun visitTryExpression( - tryExpression: FirTryExpression, - data: ConeKotlinType? - ) { - tryExpression.calleeReference.accept(this, null) - tryExpression.tryBlock.accept(this, data) - tryExpression.catches.forEach { it.accept(this, data) } - tryExpression.finallyBlock?.accept(this, data) - } - - override fun visitCatch( - catch: FirCatch, - data: ConeKotlinType? - ) { - catch.parameter.accept(this, null) - catch.block.accept(this, data) } - - override fun visitElvisExpression( - elvisExpression: FirElvisExpression, - data: ConeKotlinType? - ) { - elvisExpression.calleeReference - elvisExpression.lhs.accept(this, data) - elvisExpression.rhs.accept(this, data) - } - - override fun visitSafeCallExpression( - safeCallExpression: FirSafeCallExpression, - data: ConeKotlinType? - ) { - safeCallExpression.receiver.accept(this, null) - safeCallExpression.selector.accept(this, data) - } - - override fun visitVariableAssignment( - variableAssignment: FirVariableAssignment, - data: ConeKotlinType? - ) { - variableAssignment.lValue.accept(this, null) - variableAssignment.rValue.accept(this, data) - } - }, null) - null -} - -@OptIn(UnresolvedExpressionTypeAccess::class) -private fun FirFunctionCall.matches(expression: FirExpression?): Boolean { - if (this === expression) return true - if (expression !is FirFunctionCall) return false - if (this !is FirImplicitInvokeCall) return false - if (expression.coneTypeOrNull != null) return false - return expression.source == this.source && expression.calleeReference.symbol == this.calleeReference.symbol + if (toSymbol()?.isTypeFunction() == true) return emptyList() + return options().flatMap { it.cachedCorrespondingSupertypes(constructor) ?: return null } + } } -@OptIn(UnresolvedExpressionTypeAccess::class) -private tailrec fun FirExpression.transformConeType(transform: (ConeKotlinType) -> ConeKotlinType) { - if (this is FirNamedArgumentExpression) return expression.transformConeType(transform) - if (this is FirAnonymousFunctionExpression) { - anonymousFunction.replaceReturnTypeRef( - anonymousFunction.returnTypeRef.withReplacedReturnType( - anonymousFunction.returnTypeRef.coneTypeOrNull?.let( - transform - ) - ) - ) - return +class KindTypeRefiner(override val session: FirSession) : AbstractTypeRefiner(), SessionHolder { + @TypeRefinement + override fun refineType(type: KotlinTypeMarker): KotlinTypeMarker { + if (type !is ConeKotlinType) return type + if (type.attributes.shouldLeaveUnevaluated) return type + return type.applyKOrSelf() } - replaceConeTypeOrNull(coneTypeOrNull?.let(transform)) -} \ No newline at end of file +} diff --git a/compiler-plugin/src/io/github/kyay10/highkt/fir/ids.kt b/compiler-plugin/src/io/github/kyay10/highkt/fir/ids.kt index e6621a5..8bdfccc 100644 --- a/compiler-plugin/src/io/github/kyay10/highkt/fir/ids.kt +++ b/compiler-plugin/src/io/github/kyay10/highkt/fir/ids.kt @@ -1,14 +1,10 @@ package io.github.kyay10.highkt.fir -import org.jetbrains.kotlin.name.CallableId import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name val PACKAGE_FQN = FqName("io.github.kyay10.highkt") -val ASSERT_IS_TYPE = Name.identifier("assertIsType") -val EXPAND_TO = Name.identifier("expandTo") -val EXPAND_TO_ID = CallableId(PACKAGE_FQN, EXPAND_TO) val IDENTITY_CLASS_ID = ClassId(PACKAGE_FQN, Name.identifier("Id")) val K_CLASS_ID = ClassId(PACKAGE_FQN, Name.identifier("K")) val TYPE_FUNCTION_CLASS_ID = ClassId(PACKAGE_FQN, Name.identifier("TypeFunction")) \ No newline at end of file diff --git a/compiler-plugin/src/io/github/kyay10/highkt/fir/refinement.kt b/compiler-plugin/src/io/github/kyay10/highkt/fir/refinement.kt index a78987b..8ddd7d3 100644 --- a/compiler-plugin/src/io/github/kyay10/highkt/fir/refinement.kt +++ b/compiler-plugin/src/io/github/kyay10/highkt/fir/refinement.kt @@ -6,6 +6,8 @@ import org.jetbrains.kotlin.fir.plugin.createConeType import org.jetbrains.kotlin.fir.resolve.createParametersSubstitutor import org.jetbrains.kotlin.fir.resolve.fullyExpandedType import org.jetbrains.kotlin.fir.resolve.toRegularClassSymbol +import org.jetbrains.kotlin.fir.resolve.toSymbol +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol import org.jetbrains.kotlin.fir.types.ConeFlexibleType import org.jetbrains.kotlin.fir.types.ConeIntersectionType @@ -19,7 +21,6 @@ import org.jetbrains.kotlin.fir.types.classId import org.jetbrains.kotlin.fir.types.constructType import org.jetbrains.kotlin.fir.types.isMarkedNullable import org.jetbrains.kotlin.fir.types.isStarProjection -import org.jetbrains.kotlin.fir.types.isSubtypeOf import org.jetbrains.kotlin.fir.types.replaceType import org.jetbrains.kotlin.fir.types.toTrivialFlexibleType import org.jetbrains.kotlin.fir.types.type @@ -31,14 +32,14 @@ context(c: SessionHolder) private fun ConeKotlinType.applyKOnTheOutside(): ConeKotlinType? { val (realType, appliedTypes) = deconstructIfKType() ?: return null return realType.toRegularClassSymbol()?.applyTypeFunctions(appliedTypes) - ?.withNullability(isMarkedNullable, c.session.typeContext, preserveAttributes = true) + ?.withNullability(isMarkedNullable, c.session.typeContext, attributes = attributes.add(ExpandedTypeAttribute(this)), preserveAttributes = true) } context(c: SessionHolder) private fun ConeKotlinType.deconstructIfKType(): Pair>? { var realType: ConeKotlinType = fullyExpandedType() val appliedTypes = buildList { - while (realType.isK()) { + while (realType.isK && realType.typeArguments.size == 2) { add(0, realType.typeArguments[1]) realType = realType.typeArguments[0].type?.fullyExpandedType() ?: return null // Caused by malformed K type } @@ -46,13 +47,14 @@ private fun ConeKotlinType.deconstructIfKType(): Pair> { +private fun ConeKotlinType.deconstructNormalType(): Pair>? { val realType = fullyExpandedType() + if (realType.isK) return null return realType to realType.typeArguments.toList() } @@ -61,24 +63,28 @@ private tailrec fun FirRegularClassSymbol.applyTypeFunctions( appliedTypes: List, default: ConeKotlinType? = null ): ConeKotlinType? { if (ownTypeParameterSymbols.size > appliedTypes.size) return default // partially-applied type - require(classId != K_CLASS_ID) { "Should not be called on K; was called with arguments $appliedTypes" } - if (!hasAnnotation(TYPE_FUNCTION_CLASS_ID, c.session)) { + if (classId == K_CLASS_ID) return default // should not be called on K + if (!isTypeFunction()) { if (ownTypeParameterSymbols.size != appliedTypes.size) return default return constructType(appliedTypes.toTypedArray()) } // TODO what if K? - val substituted = if (classId == IDENTITY_CLASS_ID) appliedTypes.first().type else { + val substituted = (if (classId == IDENTITY_CLASS_ID) appliedTypes.first().type else { val superType = resolvedSuperTypeRefs.single().coneType val substitutor = createParametersSubstitutor(c.session, ownTypeParameterSymbols.zip(appliedTypes).toMap()) substitutor.substituteOrNull(superType) - } ?: return default + }) ?: return default val appliedTypes = appliedTypes.drop(ownTypeParameterSymbols.size) val newDefault = substituted.createKType(appliedTypes) val (realType, newApplied) = substituted.deconstructIfKType() ?: substituted.deconstructNormalType() + ?: return newDefault val symbol = realType.toRegularClassSymbol() ?: return newDefault return symbol.applyTypeFunctions(newApplied + appliedTypes, newDefault) } +context(c: SessionHolder) +fun FirBasedSymbol<*>.isTypeFunction(): Boolean = hasAnnotation(TYPE_FUNCTION_CLASS_ID, c.session) + // TODO: application order? context(c: SessionHolder) private fun ConeKotlinType.applyKEverywhere(): ConeKotlinType? { @@ -120,8 +126,9 @@ fun ConeKotlinType.toCanonicalKType(): ConeKotlinType? { } if (this is ConeIntersectionType) return mapTypesNotNull { it.toCanonicalKType() } if (typeArguments.isEmpty()) return null - if (isK()) return null - return withNullability(false, c.session.typeContext, preserveAttributes = true).withArguments { ConeStarProjection } + if (isK) return null + val symbol = toSymbol() ?: return null + return symbol.constructType(Array(typeArguments.size) { ConeStarProjection }) .createKType(typeArguments.asList()) .withNullability(canBeNull(c.session), c.session.typeContext, preserveAttributes = true) } @@ -131,19 +138,7 @@ private fun ConeKotlinType.createKType(typeArguments: List) typeArguments.fold(this) { acc, arg -> K_CLASS_ID.createConeType(c.session, arrayOf(acc, arg)) } context(_: SessionHolder) -fun ConeKotlinType.canonicalize(shouldCanonicalize: Boolean): ConeKotlinType = - if (shouldCanonicalize) toCanonicalKType() ?: this else this - -context(_: SessionHolder) -fun ConeKotlinType.applyKAndCanonicalizeList(): List = applyKEverywhere()?.let { - listOfNotNull(it, it.toCanonicalKType()) -} ?: listOfNotNull(toCanonicalKType()) - -context(_: SessionHolder) -fun ConeKotlinType?.isK() = this != null && fullyExpandedType().classId == K_CLASS_ID - -context(c: SessionHolder) -infix fun ConeKotlinType.expandsTo(other: ConeKotlinType) = isSubtypeOf(other.applyKOrSelf(), c.session) +val ConeKotlinType?.isK get() = this != null && fullyExpandedType().classId == K_CLASS_ID context(c: SessionHolder) private inline fun ConeIntersectionType.mapTypesNotNull(func: (ConeKotlinType) -> ConeKotlinType?): ConeKotlinType? = diff --git a/compiler-plugin/src/io/github/kyay10/highkt/ir/RemoveKCastsGenerationExtension.kt b/compiler-plugin/src/io/github/kyay10/highkt/ir/RemoveKCastsGenerationExtension.kt index cef38f2..f0f30f1 100644 --- a/compiler-plugin/src/io/github/kyay10/highkt/ir/RemoveKCastsGenerationExtension.kt +++ b/compiler-plugin/src/io/github/kyay10/highkt/ir/RemoveKCastsGenerationExtension.kt @@ -2,39 +2,63 @@ package io.github.kyay10.highkt.ir import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext +import org.jetbrains.kotlin.backend.jvm.JvmIrTypeSystemContext +import org.jetbrains.kotlin.backend.jvm.overrides.IrJavaIncompatibilityRulesOverridabilityCondition import org.jetbrains.kotlin.ir.IrElement +import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrTypeOperator import org.jetbrains.kotlin.ir.expressions.IrTypeOperatorCall +import org.jetbrains.kotlin.ir.overrides.IrOverrideChecker +import org.jetbrains.kotlin.ir.overrides.MemberWithOriginal +import org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.types.classFqName +import org.jetbrains.kotlin.ir.types.IrTypeSystemContextImpl import org.jetbrains.kotlin.ir.types.impl.buildSimpleType +import org.jetbrains.kotlin.ir.util.allParameters import org.jetbrains.kotlin.ir.util.erasedUpperBound +import org.jetbrains.kotlin.ir.util.functions +import org.jetbrains.kotlin.ir.util.hasAnnotation import org.jetbrains.kotlin.ir.util.kotlinFqName +import org.jetbrains.kotlin.ir.util.nonDispatchParameters import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid import org.jetbrains.kotlin.ir.visitors.IrTypeTransformerVoid +import org.jetbrains.kotlin.ir.visitors.IrVisitorVoid import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.platform.jvm.isJvm +import org.jetbrains.kotlin.resolve.OverridingUtil.OverrideCompatibilityInfo -private val K_FQNAME = FqName("io.github.kyay10.highkt.K") class RemoveKCastsGenerationExtension : IrGenerationExtension { override fun generate( moduleFragment: IrModuleFragment, pluginContext: IrPluginContext ) { + moduleFragment.acceptChildrenVoid(FixupOverriddenFunctionsVisitor(pluginContext)) moduleFragment.transformChildrenVoid(RemoveKCastsTransformer()) moduleFragment.acceptChildrenVoid(EraseKTypesTransformer(pluginContext)) } } +private val K_FQNAME = FqName("io.github.kyay10.highkt.K") +private val TYPE_LAMBDA_FQNAME = FqName("io.github.kyay10.highkt.TypeLambda") +private val IrType.isK: Boolean + get() = erasedUpperBound.kotlinFqName == K_FQNAME || erasedUpperBound.hasAnnotation( + TYPE_LAMBDA_FQNAME + ) +private val IrType.containsK: Boolean + get() = isK || (this as? IrSimpleType)?.arguments?.any { + it is IrType && it.containsK + } == true + // Not strictly necessary, but helps clean the code a bit class RemoveKCastsTransformer : IrElementTransformerVoid() { override fun visitTypeOperator(expression: IrTypeOperatorCall): IrExpression { if (expression.operator == IrTypeOperator.CAST || expression.operator == IrTypeOperator.IMPLICIT_CAST || expression.operator == IrTypeOperator.REINTERPRET_CAST) { - if (expression.type.classFqName == K_FQNAME) { + if (expression.type.isK) { return expression.argument.transform(this, null) } } @@ -48,7 +72,7 @@ class EraseKTypesTransformer(val pluginContext: IrPluginContext) : IrTypeTransfo container: IrElement, type: Type ): Type = when { type !is IrSimpleType -> type - type.erasedUpperBound.kotlinFqName == K_FQNAME -> pluginContext.irBuiltIns.anyNType as Type + type.isK -> pluginContext.irBuiltIns.anyNType as Type else -> type.buildSimpleType { arguments = type.arguments.map { if (it !is IrType) return@map it @@ -56,4 +80,63 @@ class EraseKTypesTransformer(val pluginContext: IrPluginContext) : IrTypeTransfo } } as Type } -} \ No newline at end of file +} + +class FixupOverriddenFunctionsVisitor(pluginContext: IrPluginContext) : IrVisitorVoid() { + val typeSystemContext = + if (pluginContext.platform.isJvm()) JvmIrTypeSystemContext(pluginContext.irBuiltIns) else IrTypeSystemContextImpl( + pluginContext.irBuiltIns + ) + val overrideChecker = IrOverrideChecker( + typeSystemContext, + if (pluginContext.platform.isJvm()) listOf(IrJavaIncompatibilityRulesOverridabilityCondition()) else emptyList() + ) + + override fun visitElement(element: IrElement) { + element.acceptChildrenVoid(this) + } + + @OptIn(UnsafeDuringIrConstructionAPI::class) + override fun visitClass(declaration: IrClass) { + declaration.functions.groupBy { it.name }.forEach { (_, functions) -> + val fakeOverrides = functions.filter { it.isFakeOverride } + val realFunctions = functions.filterNot { it.isFakeOverride } + for (realFunction in realFunctions) { + var parameterTypes = realFunction.nonDispatchParameters.map { it.type } + var returnType = realFunction.returnType + for (fakeOverride in fakeOverrides) { + if (realFunction.nonDispatchParameters.size != parameterTypes.size) continue + fakeOverride.nonDispatchParameters.zip(realFunction.nonDispatchParameters).forEach { (fakeParameter, realParameter) -> + if (fakeParameter.type.containsK) { // TODO check that fakeParameter.type evaluates to realParameter.type + realParameter.type = fakeParameter.type + } + } + if (fakeOverride.returnType.containsK) { + realFunction.returnType = fakeOverride.returnType + } + val overridability = overrideChecker.isOverridableBy( + MemberWithOriginal(fakeOverride), + MemberWithOriginal(realFunction), + checkIsInlineFlag = true + ) + when (overridability.result) { + OverrideCompatibilityInfo.Result.OVERRIDABLE -> { + realFunction.overriddenSymbols += fakeOverride.overriddenSymbols + parameterTypes = realFunction.nonDispatchParameters.map { it.type } + returnType = realFunction.returnType + declaration.declarations.remove(fakeOverride) + } + + OverrideCompatibilityInfo.Result.CONFLICT -> Unit + OverrideCompatibilityInfo.Result.INCOMPATIBLE -> Unit + } + } + realFunction.nonDispatchParameters.zip(parameterTypes).forEach { (parameter, type) -> + parameter.type = type + } + realFunction.returnType = returnType + } + } + super.visitClass(declaration) + } +} diff --git a/compiler-plugin/test-gen/io/github/kyay10/highkt/runners/JvmBoxTestGenerated.java b/compiler-plugin/test-gen/io/github/kyay10/highkt/runners/JvmBoxTestGenerated.java index ab29611..7d5dbe0 100644 --- a/compiler-plugin/test-gen/io/github/kyay10/highkt/runners/JvmBoxTestGenerated.java +++ b/compiler-plugin/test-gen/io/github/kyay10/highkt/runners/JvmBoxTestGenerated.java @@ -26,6 +26,12 @@ public void testCategory() { runTest("compiler-plugin/testData/box/category.kt"); } + @Test + @TestMetadata("prompt.kt") + public void testPrompt() { + runTest("compiler-plugin/testData/box/prompt.kt"); + } + @Test @TestMetadata("simple.kt") public void testSimple() { diff --git a/compiler-plugin/testData/box/category.fir.ir.txt b/compiler-plugin/testData/box/category.fir.ir.txt index 9d1afc8..1708b27 100644 --- a/compiler-plugin/testData/box/category.fir.ir.txt +++ b/compiler-plugin/testData/box/category.fir.ir.txt @@ -15,7 +15,7 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun toString (): kotlin.String declared in kotlin.Any - FUN name:compose visibility:public modality:ABSTRACT returnType:kotlin.Any? + FUN name:compose visibility:public modality:ABSTRACT returnType:kotlin.Any? [infix] TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:C index:2 variance: superTypes:[kotlin.Any?] reified:false @@ -494,7 +494,7 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun toString (): kotlin.String declared in foo.bar.Category - FUN name:compose visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:compose visibility:public modality:OPEN returnType:kotlin.Any? [infix] TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:C index:2 variance: superTypes:[kotlin.Any?] reified:false @@ -504,29 +504,17 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun compose (: kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1 - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Any? declared in foo.bar.ArrowCategory.compose' type=kotlin.Any? origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1 - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ArrowCategory.compose' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun compose (: kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar.ArrowCategory' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:C of foo.bar.ArrowCategory.compose - VALUE_PARAMETER kind:Regular name:a index:0 type:A of foo.bar.ArrowCategory.compose - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (a: A of foo.bar.ArrowCategory.compose): C of foo.bar.ArrowCategory.compose declared in foo.bar.ArrowCategory.compose' - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=C of foo.bar.ArrowCategory.compose origin=INVOKE - ARG : TYPE_OP type=kotlin.Function1 origin=IMPLICIT_CAST typeOperand=kotlin.Function1 - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ArrowCategory.compose' type=kotlin.Any? origin=null - ARG p1: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.ArrowCategory.compose origin=INVOKE - ARG : TYPE_OP type=kotlin.Function1 origin=IMPLICIT_CAST typeOperand=kotlin.Function1 - GET_VAR 'g: kotlin.Any? declared in foo.bar.ArrowCategory.compose' type=kotlin.Any? origin=null - ARG p1: GET_VAR 'a: A of foo.bar.ArrowCategory.compose declared in foo.bar.ArrowCategory.compose.' type=A of foo.bar.ArrowCategory.compose origin=null + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:C of foo.bar.ArrowCategory.compose + VALUE_PARAMETER kind:Regular name:a index:0 type:A of foo.bar.ArrowCategory.compose + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (a: A of foo.bar.ArrowCategory.compose): C of foo.bar.ArrowCategory.compose declared in foo.bar.ArrowCategory.compose' + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=C of foo.bar.ArrowCategory.compose origin=INVOKE + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ArrowCategory.compose' type=kotlin.Function1 origin=null + ARG p1: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.ArrowCategory.compose origin=INVOKE + ARG : GET_VAR 'g: kotlin.Any? declared in foo.bar.ArrowCategory.compose' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION + ARG p1: GET_VAR 'a: A of foo.bar.ArrowCategory.compose declared in foo.bar.ArrowCategory.compose.' type=A of foo.bar.ArrowCategory.compose origin=null FUN name:source visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.ArrowCategory @@ -534,12 +522,8 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun source (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1 - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ArrowCategory.source' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun source (: kotlin.Any?): kotlin.Any? declared in foo.bar.ArrowCategory' - CALL 'public final fun idArrow (): kotlin.Function1 declared in foo.bar' type=kotlin.Any? origin=null + CALL 'public final fun idArrow (): kotlin.Function1 declared in foo.bar' type=kotlin.Function1 origin=null TYPE_ARG A: A of foo.bar.ArrowCategory.source FUN name:target visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -548,12 +532,8 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun target (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1<*, A of foo.bar.ArrowCategory.target> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ArrowCategory.target' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun target (: kotlin.Any?): kotlin.Any? declared in foo.bar.ArrowCategory' - CALL 'public final fun idArrow (): kotlin.Function1 declared in foo.bar' type=kotlin.Any? origin=null + CALL 'public final fun idArrow (): kotlin.Function1 declared in foo.bar' type=kotlin.Function1 origin=null TYPE_ARG A: A of foo.bar.ArrowCategory.target FUN name:Iso visibility:private modality:FINAL returnType:foo.bar.Iso TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -563,12 +543,6 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:Regular name:to index:0 type:foo.bar.Nat VALUE_PARAMETER kind:Regular name:from index:1 type:foo.bar.Iso BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'to: foo.bar.Nat declared in foo.bar.Iso' type=foo.bar.Nat origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'from: foo.bar.Iso declared in foo.bar.Iso' type=foo.bar.Iso origin=null RETURN type=kotlin.Nothing from='private final fun Iso (to: foo.bar.Nat, from: foo.bar.Iso): foo.bar.Iso declared in foo.bar' BLOCK type=foo.bar.Iso. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Iso; foo.bar.Nat] @@ -664,12 +638,6 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:Regular name:to index:0 type:foo.bar.Nat VALUE_PARAMETER kind:Regular name:from index:1 type:foo.bar.Nat BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'to: foo.bar.Nat declared in foo.bar.Iso' type=foo.bar.Nat origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'from: foo.bar.Nat declared in foo.bar.Iso' type=foo.bar.Nat origin=null RETURN type=kotlin.Nothing from='public final fun Iso (to: foo.bar.Nat, from: foo.bar.Nat): foo.bar.Iso declared in foo.bar' BLOCK type=foo.bar.Iso. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Iso; foo.bar.Nat] @@ -773,15 +741,12 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:foo.bar.Nat VALUE_PARAMETER kind:Regular name:h index:1 type:kotlin.Any? BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': foo.bar.Nat declared in foo.bar.at' type=foo.bar.Nat origin=null RETURN type=kotlin.Nothing from='public final fun at (: foo.bar.Nat, h: kotlin.Any?): kotlin.Any? declared in foo.bar' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null TYPE_ARG A: foo.bar.Functor TYPE_ARG B: foo.bar.Category TYPE_ARG C: foo.bar.Category - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: kotlin.Any? ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor origin=GET_PROPERTY ARG : GET_VAR ': foo.bar.Nat declared in foo.bar.at' type=foo.bar.Nat origin=IMPLICIT_ARGUMENT ARG b: CALL 'public abstract fun (): foo.bar.Category declared in foo.bar.Functor' type=foo.bar.Category origin=GET_PROPERTY @@ -847,7 +812,7 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_ARG B: B of foo.bar.compose TYPE_ARG C: C of foo.bar.compose ARG (index:0): GET_VAR '$this$with: foo.bar.Category declared in foo.bar.compose.' type=foo.bar.Category origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.compose' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.compose' type=kotlin.Any? origin=null ARG g: GET_VAR 'g: kotlin.Any? declared in foo.bar.compose' type=kotlin.Any? origin=null FUN name:composeFunctors visibility:public modality:FINAL returnType:foo.bar.Functor TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -858,12 +823,6 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:Context name:f index:0 type:foo.bar.Functor VALUE_PARAMETER kind:Context name:g index:1 type:foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null RETURN type=kotlin.Nothing from='public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' BLOCK type=foo.bar.composeFunctors. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Functor] @@ -933,22 +892,16 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_ARG A: kotlin.Any? TYPE_ARG B: kotlin.Any? ARG functor: GET_VAR 'f: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null - ARG f: CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG C: C of foo.bar.composeFunctors - TYPE_ARG D: D of foo.bar.composeFunctors - TYPE_ARG F: G of foo.bar.composeFunctors + ARG f: CALL 'public abstract fun lift (f: kotlin.Any?): kotlin.Any? declared in foo.bar.Functor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.composeFunctors..lift TYPE_ARG B: B of foo.bar.composeFunctors..lift - ARG functor: GET_VAR 'g: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null + ARG : GET_VAR 'g: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null ARG f: GET_VAR 'h: kotlin.Any? declared in foo.bar.composeFunctors..lift' type=kotlin.Any? origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.composeFunctors.' type=foo.bar.composeFunctors. origin=OBJECT_LITERAL FUN name:endoFunctorComposeTensor visibility:public modality:FINAL returnType:foo.bar.TensorProduct, io.github.kyay10.highkt.Id<*>> TYPE_PARAMETER name:Cat index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:Context name:k index:0 type:foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'k: foo.bar.Category declared in foo.bar.endoFunctorComposeTensor' type=foo.bar.Category origin=null RETURN type=kotlin.Nothing from='public final fun endoFunctorComposeTensor (k: foo.bar.Category): foo.bar.TensorProduct, io.github.kyay10.highkt.Id<*>> declared in foo.bar' BLOCK type=foo.bar.endoFunctorComposeTensor. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.TensorProduct, io.github.kyay10.highkt.Id<*>>; foo.bar.Functor>] @@ -965,32 +918,32 @@ FILE fqName:foo.bar fileName:/category.kt PROPERTY name:unitObject visibility:public modality:OPEN [val] overridden: public abstract unitObject: kotlin.Any? declared in foo.bar.TensorProduct - FIELD PROPERTY_BACKING_FIELD name:unitObject type:kotlin.Any? visibility:private [final] + FIELD PROPERTY_BACKING_FIELD name:unitObject type:foo.bar.Iso, io.github.kyay10.highkt.Id<*>> visibility:private [final] EXPRESSION_BODY - CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Nat, io.github.kyay10.highkt.Id<*>> origin=null + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Iso, io.github.kyay10.highkt.Id<*>> origin=null TYPE_ARG T: foo.bar.Functor> - TYPE_ARG R: kotlin.Any? + TYPE_ARG R: foo.bar.Iso, io.github.kyay10.highkt.Id<*>> ARG with: CALL 'public final fun identityFunctor (c: foo.bar.Category): foo.bar.Functor> declared in foo.bar' type=foo.bar.Functor> origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor ARG c: GET_VAR 'k: foo.bar.Category declared in foo.bar.endoFunctorComposeTensor' type=foo.bar.Category origin=null - ARG block: FUN_EXPR type=kotlin.Function1>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG block: FUN_EXPR type=kotlin.Function1>, foo.bar.Iso, io.github.kyay10.highkt.Id<*>>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Iso, io.github.kyay10.highkt.Id<*>> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor>): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..unitObject' - CALL 'public final fun identityNat (functor: foo.bar.Functor): foo.bar.Iso declared in foo.bar' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor>): foo.bar.Iso, io.github.kyay10.highkt.Id<*>> declared in foo.bar.endoFunctorComposeTensor..unitObject' + CALL 'public final fun identityNat (functor: foo.bar.Functor): foo.bar.Iso declared in foo.bar' type=foo.bar.Iso, io.github.kyay10.highkt.Id<*>> origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor TYPE_ARG F: io.github.kyay10.highkt.Id<*> ARG functor: GET_VAR '$context-Functor: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..unitObject.' type=foo.bar.Functor> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:kotlin.Any? + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Iso, io.github.kyay10.highkt.Id<*>> VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor. correspondingProperty: PROPERTY name:unitObject visibility:public modality:OPEN [val] overridden: public abstract fun (): kotlin.Any? declared in foo.bar.TensorProduct BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor.' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:unitObject type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Iso, io.github.kyay10.highkt.Id<*>> declared in foo.bar.endoFunctorComposeTensor.' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:unitObject type:foo.bar.Iso, io.github.kyay10.highkt.Id<*>> visibility:private [final]' type=foo.bar.Iso, io.github.kyay10.highkt.Id<*>> origin=null receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor. declared in foo.bar.endoFunctorComposeTensor..' type=foo.bar.endoFunctorComposeTensor. origin=null CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor. [primary] BLOCK_BODY @@ -1039,169 +992,152 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun associator (a: kotlin.Any?, b: kotlin.Any?, c: kotlin.Any?): kotlin.Any? declared in foo.bar.TensorProduct BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.associator, A of foo.bar.endoFunctorComposeTensor..associator> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=kotlin.Any? origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.associator, B of foo.bar.endoFunctorComposeTensor..associator> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'b: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=kotlin.Any? origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.associator, C of foo.bar.endoFunctorComposeTensor..associator> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun associator (a: kotlin.Any?, b: kotlin.Any?, c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): R of kotlin.context declared in kotlin' type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=null TYPE_ARG A: foo.bar.Functor.associator> TYPE_ARG B: foo.bar.Functor.associator> TYPE_ARG C: foo.bar.Functor.associator> - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.associator> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.associator, A of foo.bar.endoFunctorComposeTensor..associator> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.associator, A of foo.bar.endoFunctorComposeTensor..associator> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=kotlin.Any? origin=null + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=foo.bar.Nat.associator, A of foo.bar.endoFunctorComposeTensor..associator> origin=null ARG b: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.associator> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.associator, B of foo.bar.endoFunctorComposeTensor..associator> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.associator, B of foo.bar.endoFunctorComposeTensor..associator> - GET_VAR 'b: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=kotlin.Any? origin=null + ARG : GET_VAR 'b: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=foo.bar.Nat.associator, B of foo.bar.endoFunctorComposeTensor..associator> origin=null ARG c: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.associator> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.associator, C of foo.bar.endoFunctorComposeTensor..associator> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.associator, C of foo.bar.endoFunctorComposeTensor..associator> - GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=kotlin.Any? origin=null - ARG block: FUN_EXPR type=kotlin.Function3.associator>, foo.bar.Functor.associator>, foo.bar.Functor.associator>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG : GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' type=foo.bar.Nat.associator, C of foo.bar.endoFunctorComposeTensor..associator> origin=null + ARG block: FUN_EXPR type=kotlin.Function3.associator>, foo.bar.Functor.associator>, foo.bar.Functor.associator>, foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#1 index:0 type:foo.bar.Functor.associator> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor.associator> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#3 index:2 type:foo.bar.Functor.associator> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.associator>, $context-Functor#2: foo.bar.Functor.associator>, $context-Functor#3: foo.bar.Functor.associator>): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : BLOCK type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL - CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat] - thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> - PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null - TYPE_ARG T: foo.bar.Functor - TYPE_ARG R: foo.bar.Functor - ARG with: CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associator - TYPE_ARG G: B of foo.bar.endoFunctorComposeTensor..associator - ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null - ARG g: GET_VAR '$context-Functor#2: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null - ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Functor> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Functor - VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator...firstFunctor' - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: kotlin.Any? - TYPE_ARG G: C of foo.bar.endoFunctorComposeTensor..associator - ARG f: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator...firstFunctor.' type=foo.bar.Functor origin=null - ARG g: GET_VAR '$context-Functor#3: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associator...' type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=null - PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.associator>, $context-Functor#2: foo.bar.Functor.associator>, $context-Functor#3: foo.bar.Functor.associator>): foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associator' + BLOCK type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> + PROPERTY name:firstFunctor visibility:public modality:OPEN [val] + overridden: + public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + TYPE_ARG T: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor + ARG with: CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associator + TYPE_ARG G: B of foo.bar.endoFunctorComposeTensor..associator + ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + ARG g: GET_VAR '$context-Functor#2: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Functor> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Functor + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator...firstFunctor' + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: kotlin.Any? + TYPE_ARG G: C of foo.bar.endoFunctorComposeTensor..associator + ARG f: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator...firstFunctor.' type=foo.bar.Functor origin=null + ARG g: GET_VAR '$context-Functor#3: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> + correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] overridden: - public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null - TYPE_ARG T: foo.bar.Functor - TYPE_ARG R: foo.bar.Functor - ARG with: CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: B of foo.bar.endoFunctorComposeTensor..associator - TYPE_ARG G: C of foo.bar.endoFunctorComposeTensor..associator - ARG f: GET_VAR '$context-Functor#2: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null - ARG g: GET_VAR '$context-Functor#3: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null - ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Functor> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Functor - VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator...secondFunctor' - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associator - TYPE_ARG G: kotlin.Any? - ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null - ARG g: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator...secondFunctor.' type=foo.bar.Functor origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associator...' type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=null - CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> [primary] + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat]' type=kotlin.Unit - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun hashCode (): kotlin.Int declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun toString (): kotlin.String declared in foo.bar.Nat - FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] - TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associator...' type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=null + PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + overridden: + public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + TYPE_ARG T: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor + ARG with: CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: B of foo.bar.endoFunctorComposeTensor..associator + TYPE_ARG G: C of foo.bar.endoFunctorComposeTensor..associator + ARG f: GET_VAR '$context-Functor#2: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + ARG g: GET_VAR '$context-Functor#3: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Functor> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Functor + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator...secondFunctor' + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associator + TYPE_ARG G: kotlin.Any? + ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + ARG g: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator...secondFunctor.' type=foo.bar.Functor origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> - VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] overridden: - public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator..' - CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associator..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associator...' type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=null + CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in foo.bar.Nat + FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] + TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> + VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + overridden: + public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator..' + CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associator + TYPE_ARG A: kotlin.Any? + TYPE_ARG B: kotlin.Any? + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + ARG f: CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associator + TYPE_ARG F: B of foo.bar.endoFunctorComposeTensor..associator TYPE_ARG A: kotlin.Any? TYPE_ARG B: kotlin.Any? - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null ARG f: CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: B of foo.bar.endoFunctorComposeTensor..associator - TYPE_ARG A: kotlin.Any? - TYPE_ARG B: kotlin.Any? - ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null - ARG f: CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: C of foo.bar.endoFunctorComposeTensor..associator - TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..associator...get - TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..associator...get - ARG functor: GET_VAR '$context-Functor#3: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null - ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator...get' type=kotlin.Any? origin=null - CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..associator..' type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + TYPE_ARG F: C of foo.bar.endoFunctorComposeTensor..associator + TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..associator...get + TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..associator...get + ARG functor: GET_VAR '$context-Functor#3: foo.bar.Functor.associator> declared in foo.bar.endoFunctorComposeTensor..associator.' type=foo.bar.Functor.associator> origin=null + ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associator...get' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..associator..' type=foo.bar.endoFunctorComposeTensor..associator...associator, B of foo.bar.endoFunctorComposeTensor..associator, C of foo.bar.endoFunctorComposeTensor..associator, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL FUN name:associatorInv visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false @@ -1213,169 +1149,152 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun associatorInv (a: kotlin.Any?, b: kotlin.Any?, c: kotlin.Any?): kotlin.Any? declared in foo.bar.TensorProduct BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.associatorInv, A of foo.bar.endoFunctorComposeTensor..associatorInv> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=kotlin.Any? origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'b: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=kotlin.Any? origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun associatorInv (a: kotlin.Any?, b: kotlin.Any?, c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): R of kotlin.context declared in kotlin' type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null TYPE_ARG A: foo.bar.Functor.associatorInv> TYPE_ARG B: foo.bar.Functor.associatorInv> TYPE_ARG C: foo.bar.Functor.associatorInv> - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.associatorInv> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.associatorInv, A of foo.bar.endoFunctorComposeTensor..associatorInv> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.associatorInv, A of foo.bar.endoFunctorComposeTensor..associatorInv> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=kotlin.Any? origin=null + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=foo.bar.Nat.associatorInv, A of foo.bar.endoFunctorComposeTensor..associatorInv> origin=null ARG b: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.associatorInv> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv> - GET_VAR 'b: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=kotlin.Any? origin=null + ARG : GET_VAR 'b: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=foo.bar.Nat.associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv> origin=null ARG c: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.associatorInv> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv> - GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=kotlin.Any? origin=null - ARG block: FUN_EXPR type=kotlin.Function3.associatorInv>, foo.bar.Functor.associatorInv>, foo.bar.Functor.associatorInv>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG : GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' type=foo.bar.Nat.associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv> origin=null + ARG block: FUN_EXPR type=kotlin.Function3.associatorInv>, foo.bar.Functor.associatorInv>, foo.bar.Functor.associatorInv>, foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#1 index:0 type:foo.bar.Functor.associatorInv> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor.associatorInv> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#3 index:2 type:foo.bar.Functor.associatorInv> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.associatorInv>, $context-Functor#2: foo.bar.Functor.associatorInv>, $context-Functor#3: foo.bar.Functor.associatorInv>): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : BLOCK type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL - CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat] - thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> - PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null - TYPE_ARG T: foo.bar.Functor - TYPE_ARG R: foo.bar.Functor - ARG with: CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: B of foo.bar.endoFunctorComposeTensor..associatorInv - TYPE_ARG G: C of foo.bar.endoFunctorComposeTensor..associatorInv - ARG f: GET_VAR '$context-Functor#2: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null - ARG g: GET_VAR '$context-Functor#3: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null - ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Functor> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Functor - VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv...firstFunctor' - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associatorInv - TYPE_ARG G: kotlin.Any? - ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null - ARG g: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv...firstFunctor.' type=foo.bar.Functor origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associatorInv...' type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null - PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.associatorInv>, $context-Functor#2: foo.bar.Functor.associatorInv>, $context-Functor#3: foo.bar.Functor.associatorInv>): foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associatorInv' + BLOCK type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> + PROPERTY name:firstFunctor visibility:public modality:OPEN [val] + overridden: + public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + TYPE_ARG T: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor + ARG with: CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: B of foo.bar.endoFunctorComposeTensor..associatorInv + TYPE_ARG G: C of foo.bar.endoFunctorComposeTensor..associatorInv + ARG f: GET_VAR '$context-Functor#2: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + ARG g: GET_VAR '$context-Functor#3: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Functor> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Functor + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv...firstFunctor' + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associatorInv + TYPE_ARG G: kotlin.Any? + ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + ARG g: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv...firstFunctor.' type=foo.bar.Functor origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> + correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] overridden: - public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null - TYPE_ARG T: foo.bar.Functor - TYPE_ARG R: foo.bar.Functor - ARG with: CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associatorInv - TYPE_ARG G: B of foo.bar.endoFunctorComposeTensor..associatorInv - ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null - ARG g: GET_VAR '$context-Functor#2: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null - ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Functor> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Functor - VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv...secondFunctor' - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: kotlin.Any? - TYPE_ARG G: C of foo.bar.endoFunctorComposeTensor..associatorInv - ARG f: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv...secondFunctor.' type=foo.bar.Functor origin=null - ARG g: GET_VAR '$context-Functor#3: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associatorInv...' type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null - CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> [primary] + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat]' type=kotlin.Unit - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun hashCode (): kotlin.Int declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun toString (): kotlin.String declared in foo.bar.Nat - FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] - TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associatorInv...' type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null + PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + overridden: + public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + TYPE_ARG T: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor + ARG with: CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associatorInv + TYPE_ARG G: B of foo.bar.endoFunctorComposeTensor..associatorInv + ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + ARG g: GET_VAR '$context-Functor#2: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Functor> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Functor + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv...secondFunctor' + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: kotlin.Any? + TYPE_ARG G: C of foo.bar.endoFunctorComposeTensor..associatorInv + ARG f: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv...secondFunctor.' type=foo.bar.Functor origin=null + ARG g: GET_VAR '$context-Functor#3: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> - VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] overridden: - public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv..' - CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..associatorInv..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..associatorInv...' type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null + CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in foo.bar.Nat + FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] + TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> + VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + overridden: + public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv..' + CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associatorInv + TYPE_ARG A: kotlin.Any? + TYPE_ARG B: kotlin.Any? + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + ARG f: CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..associatorInv + TYPE_ARG F: B of foo.bar.endoFunctorComposeTensor..associatorInv TYPE_ARG A: kotlin.Any? TYPE_ARG B: kotlin.Any? - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null ARG f: CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: B of foo.bar.endoFunctorComposeTensor..associatorInv - TYPE_ARG A: kotlin.Any? - TYPE_ARG B: kotlin.Any? - ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null - ARG f: CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: C of foo.bar.endoFunctorComposeTensor..associatorInv - TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..associatorInv...get - TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..associatorInv...get - ARG functor: GET_VAR '$context-Functor#3: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null - ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv...get' type=kotlin.Any? origin=null - CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..associatorInv..' type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + TYPE_ARG F: C of foo.bar.endoFunctorComposeTensor..associatorInv + TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..associatorInv...get + TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..associatorInv...get + ARG functor: GET_VAR '$context-Functor#3: foo.bar.Functor.associatorInv> declared in foo.bar.endoFunctorComposeTensor..associatorInv.' type=foo.bar.Functor.associatorInv> origin=null + ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..associatorInv...get' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..associatorInv..' type=foo.bar.endoFunctorComposeTensor..associatorInv...associatorInv, B of foo.bar.endoFunctorComposeTensor..associatorInv, C of foo.bar.endoFunctorComposeTensor..associatorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL FUN name:leftUnitor visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor. @@ -1383,105 +1302,97 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun leftUnitor (a: kotlin.Any?): kotlin.Any? declared in foo.bar.TensorProduct BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.leftUnitor, A of foo.bar.endoFunctorComposeTensor..leftUnitor> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun leftUnitor (a: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null TYPE_ARG A: foo.bar.Functor.leftUnitor> TYPE_ARG B: foo.bar.Functor> - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.leftUnitor> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.leftUnitor, A of foo.bar.endoFunctorComposeTensor..leftUnitor> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.leftUnitor, A of foo.bar.endoFunctorComposeTensor..leftUnitor> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor' type=kotlin.Any? origin=null + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor' type=foo.bar.Nat.leftUnitor, A of foo.bar.endoFunctorComposeTensor..leftUnitor> origin=null ARG b: CALL 'public final fun identityFunctor (c: foo.bar.Category): foo.bar.Functor> declared in foo.bar' type=foo.bar.Functor> origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor ARG c: GET_VAR 'k: foo.bar.Category declared in foo.bar.endoFunctorComposeTensor' type=foo.bar.Category origin=null - ARG block: FUN_EXPR type=kotlin.Function2.leftUnitor>, foo.bar.Functor>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG block: FUN_EXPR type=kotlin.Function2.leftUnitor>, foo.bar.Functor>, foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#1 index:0 type:foo.bar.Functor.leftUnitor> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.leftUnitor>, $context-Functor#2: foo.bar.Functor>): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : BLOCK type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL - CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.leftUnitor>] - thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> - PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: io.github.kyay10.highkt.Id<*> - TYPE_ARG G: A of foo.bar.endoFunctorComposeTensor..leftUnitor - ARG f: GET_VAR '$context-Functor#2: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor.' type=foo.bar.Functor> origin=null - ARG g: GET_VAR '$context-Functor#1: foo.bar.Functor.leftUnitor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor.' type=foo.bar.Functor.leftUnitor> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..leftUnitor..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor...' type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null - PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.leftUnitor>, $context-Functor#2: foo.bar.Functor>): foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor' + BLOCK type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.leftUnitor>] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> + PROPERTY name:firstFunctor visibility:public modality:OPEN [val] + overridden: + public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: io.github.kyay10.highkt.Id<*> + TYPE_ARG G: A of foo.bar.endoFunctorComposeTensor..leftUnitor + ARG f: GET_VAR '$context-Functor#2: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor.' type=foo.bar.Functor> origin=null + ARG g: GET_VAR '$context-Functor#1: foo.bar.Functor.leftUnitor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor.' type=foo.bar.Functor.leftUnitor> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> + correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] overridden: - public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor.leftUnitor> visibility:private [final] - EXPRESSION_BODY - CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.leftUnitor> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.leftUnitor, A of foo.bar.endoFunctorComposeTensor..leftUnitor> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.leftUnitor, A of foo.bar.endoFunctorComposeTensor..leftUnitor> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor' type=kotlin.Any? origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor.leftUnitor> - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor.leftUnitor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor.leftUnitor> visibility:private [final]' type=foo.bar.Functor.leftUnitor> origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor...' type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null - CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> [primary] + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.leftUnitor>]' type=kotlin.Unit - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun hashCode (): kotlin.Int declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun toString (): kotlin.String declared in foo.bar.Nat - FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] - TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..leftUnitor..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor...' type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null + PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + overridden: + public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor.leftUnitor> visibility:private [final] + EXPRESSION_BODY + CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.leftUnitor> origin=GET_PROPERTY + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor' type=foo.bar.Nat.leftUnitor, A of foo.bar.endoFunctorComposeTensor..leftUnitor> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor.leftUnitor> VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> - VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] overridden: - public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor..' - CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..leftUnitor - TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..leftUnitor...get - TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..leftUnitor...get - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.leftUnitor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor.' type=foo.bar.Functor.leftUnitor> origin=null - ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor...get' type=kotlin.Any? origin=null - CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..leftUnitor..' type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor.leftUnitor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor.leftUnitor> visibility:private [final]' type=foo.bar.Functor.leftUnitor> origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor...' type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null + CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.leftUnitor>]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in foo.bar.Nat + FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] + TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> + VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + overridden: + public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor..' + CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..leftUnitor + TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..leftUnitor...get + TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..leftUnitor...get + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.leftUnitor> declared in foo.bar.endoFunctorComposeTensor..leftUnitor.' type=foo.bar.Functor.leftUnitor> origin=null + ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitor...get' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..leftUnitor..' type=foo.bar.endoFunctorComposeTensor..leftUnitor...leftUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL FUN name:leftUnitorInv visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor. @@ -1489,105 +1400,97 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun leftUnitorInv (a: kotlin.Any?): kotlin.Any? declared in foo.bar.TensorProduct BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.leftUnitorInv, A of foo.bar.endoFunctorComposeTensor..leftUnitorInv> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun leftUnitorInv (a: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null TYPE_ARG A: foo.bar.Functor.leftUnitorInv> TYPE_ARG B: foo.bar.Functor> - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.leftUnitorInv> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.leftUnitorInv, A of foo.bar.endoFunctorComposeTensor..leftUnitorInv> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.leftUnitorInv, A of foo.bar.endoFunctorComposeTensor..leftUnitorInv> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv' type=kotlin.Any? origin=null + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv' type=foo.bar.Nat.leftUnitorInv, A of foo.bar.endoFunctorComposeTensor..leftUnitorInv> origin=null ARG b: CALL 'public final fun identityFunctor (c: foo.bar.Category): foo.bar.Functor> declared in foo.bar' type=foo.bar.Functor> origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor ARG c: GET_VAR 'k: foo.bar.Category declared in foo.bar.endoFunctorComposeTensor' type=foo.bar.Category origin=null - ARG block: FUN_EXPR type=kotlin.Function2.leftUnitorInv>, foo.bar.Functor>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG block: FUN_EXPR type=kotlin.Function2.leftUnitorInv>, foo.bar.Functor>, foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#1 index:0 type:foo.bar.Functor.leftUnitorInv> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.leftUnitorInv>, $context-Functor#2: foo.bar.Functor>): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : BLOCK type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL - CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.leftUnitorInv, kotlin.Any?>] - thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> - PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor.leftUnitorInv> visibility:private [final] - EXPRESSION_BODY - CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.leftUnitorInv> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.leftUnitorInv, A of foo.bar.endoFunctorComposeTensor..leftUnitorInv> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.leftUnitorInv, A of foo.bar.endoFunctorComposeTensor..leftUnitorInv> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv' type=kotlin.Any? origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor.leftUnitorInv> - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor.leftUnitorInv> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor.leftUnitorInv> visibility:private [final]' type=foo.bar.Functor.leftUnitorInv> origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv...' type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null - PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.leftUnitorInv>, $context-Functor#2: foo.bar.Functor>): foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv' + BLOCK type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.leftUnitorInv, kotlin.Any?>] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> + PROPERTY name:firstFunctor visibility:public modality:OPEN [val] + overridden: + public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor.leftUnitorInv> visibility:private [final] + EXPRESSION_BODY + CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.leftUnitorInv> origin=GET_PROPERTY + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv' type=foo.bar.Nat.leftUnitorInv, A of foo.bar.endoFunctorComposeTensor..leftUnitorInv> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor.leftUnitorInv> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> + correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] overridden: - public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: io.github.kyay10.highkt.Id<*> - TYPE_ARG G: A of foo.bar.endoFunctorComposeTensor..leftUnitorInv - ARG f: GET_VAR '$context-Functor#2: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv.' type=foo.bar.Functor> origin=null - ARG g: GET_VAR '$context-Functor#1: foo.bar.Functor.leftUnitorInv> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv.' type=foo.bar.Functor.leftUnitorInv> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv...' type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null - CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> [primary] + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.leftUnitorInv, kotlin.Any?>]' type=kotlin.Unit - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun hashCode (): kotlin.Int declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun toString (): kotlin.String declared in foo.bar.Nat - FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] - TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor.leftUnitorInv> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor.leftUnitorInv> visibility:private [final]' type=foo.bar.Functor.leftUnitorInv> origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv...' type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null + PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + overridden: + public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: io.github.kyay10.highkt.Id<*> + TYPE_ARG G: A of foo.bar.endoFunctorComposeTensor..leftUnitorInv + ARG f: GET_VAR '$context-Functor#2: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv.' type=foo.bar.Functor> origin=null + ARG g: GET_VAR '$context-Functor#1: foo.bar.Functor.leftUnitorInv> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv.' type=foo.bar.Functor.leftUnitorInv> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> - VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] overridden: - public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv..' - CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..leftUnitorInv - TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..leftUnitorInv...get - TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..leftUnitorInv...get - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.leftUnitorInv> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv.' type=foo.bar.Functor.leftUnitorInv> origin=null - ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv...get' type=kotlin.Any? origin=null - CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv..' type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv...' type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null + CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.leftUnitorInv, kotlin.Any?>]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in foo.bar.Nat + FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] + TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> + VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + overridden: + public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv..' + CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..leftUnitorInv + TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..leftUnitorInv...get + TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..leftUnitorInv...get + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.leftUnitorInv> declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv.' type=foo.bar.Functor.leftUnitorInv> origin=null + ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv...get' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..leftUnitorInv..' type=foo.bar.endoFunctorComposeTensor..leftUnitorInv...leftUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL FUN name:rightUnitor visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor. @@ -1595,105 +1498,97 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun rightUnitor (a: kotlin.Any?): kotlin.Any? declared in foo.bar.TensorProduct BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.rightUnitor, A of foo.bar.endoFunctorComposeTensor..rightUnitor> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun rightUnitor (a: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null TYPE_ARG A: foo.bar.Functor.rightUnitor> TYPE_ARG B: foo.bar.Functor> - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.rightUnitor> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.rightUnitor, A of foo.bar.endoFunctorComposeTensor..rightUnitor> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.rightUnitor, A of foo.bar.endoFunctorComposeTensor..rightUnitor> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor' type=kotlin.Any? origin=null + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor' type=foo.bar.Nat.rightUnitor, A of foo.bar.endoFunctorComposeTensor..rightUnitor> origin=null ARG b: CALL 'public final fun identityFunctor (c: foo.bar.Category): foo.bar.Functor> declared in foo.bar' type=foo.bar.Functor> origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor ARG c: GET_VAR 'k: foo.bar.Category declared in foo.bar.endoFunctorComposeTensor' type=foo.bar.Category origin=null - ARG block: FUN_EXPR type=kotlin.Function2.rightUnitor>, foo.bar.Functor>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG block: FUN_EXPR type=kotlin.Function2.rightUnitor>, foo.bar.Functor>, foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#1 index:0 type:foo.bar.Functor.rightUnitor> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.rightUnitor>, $context-Functor#2: foo.bar.Functor>): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : BLOCK type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL - CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.rightUnitor>] - thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> - PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..rightUnitor - TYPE_ARG G: io.github.kyay10.highkt.Id<*> - ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.rightUnitor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor.' type=foo.bar.Functor.rightUnitor> origin=null - ARG g: GET_VAR '$context-Functor#2: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor.' type=foo.bar.Functor> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..rightUnitor..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor...' type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null - PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.rightUnitor>, $context-Functor#2: foo.bar.Functor>): foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor' + BLOCK type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.rightUnitor>] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> + PROPERTY name:firstFunctor visibility:public modality:OPEN [val] + overridden: + public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..rightUnitor + TYPE_ARG G: io.github.kyay10.highkt.Id<*> + ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.rightUnitor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor.' type=foo.bar.Functor.rightUnitor> origin=null + ARG g: GET_VAR '$context-Functor#2: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor.' type=foo.bar.Functor> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> + correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] overridden: - public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor.rightUnitor> visibility:private [final] - EXPRESSION_BODY - CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.rightUnitor> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.rightUnitor, A of foo.bar.endoFunctorComposeTensor..rightUnitor> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.rightUnitor, A of foo.bar.endoFunctorComposeTensor..rightUnitor> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor' type=kotlin.Any? origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor.rightUnitor> - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor.rightUnitor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor.rightUnitor> visibility:private [final]' type=foo.bar.Functor.rightUnitor> origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor...' type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null - CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> [primary] + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.rightUnitor>]' type=kotlin.Unit - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun hashCode (): kotlin.Int declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun toString (): kotlin.String declared in foo.bar.Nat - FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] - TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..rightUnitor..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor...' type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null + PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + overridden: + public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor.rightUnitor> visibility:private [final] + EXPRESSION_BODY + CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.rightUnitor> origin=GET_PROPERTY + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor' type=foo.bar.Nat.rightUnitor, A of foo.bar.endoFunctorComposeTensor..rightUnitor> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor.rightUnitor> VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> - VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] overridden: - public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor..' - CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..rightUnitor - TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..rightUnitor...get - TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..rightUnitor...get - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.rightUnitor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor.' type=foo.bar.Functor.rightUnitor> origin=null - ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor...get' type=kotlin.Any? origin=null - CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..rightUnitor..' type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor.rightUnitor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor.rightUnitor> visibility:private [final]' type=foo.bar.Functor.rightUnitor> origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor...' type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=null + CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.rightUnitor>]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in foo.bar.Nat + FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] + TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> + VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + overridden: + public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor..' + CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..rightUnitor + TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..rightUnitor...get + TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..rightUnitor...get + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.rightUnitor> declared in foo.bar.endoFunctorComposeTensor..rightUnitor.' type=foo.bar.Functor.rightUnitor> origin=null + ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitor...get' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..rightUnitor..' type=foo.bar.endoFunctorComposeTensor..rightUnitor...rightUnitor, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL FUN name:rightUnitorInv visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor. @@ -1701,105 +1596,97 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun rightUnitorInv (a: kotlin.Any?): kotlin.Any? declared in foo.bar.TensorProduct BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.rightUnitorInv, A of foo.bar.endoFunctorComposeTensor..rightUnitorInv> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun rightUnitorInv (a: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null TYPE_ARG A: foo.bar.Functor.rightUnitorInv> TYPE_ARG B: foo.bar.Functor> - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.rightUnitorInv> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.rightUnitorInv, A of foo.bar.endoFunctorComposeTensor..rightUnitorInv> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.rightUnitorInv, A of foo.bar.endoFunctorComposeTensor..rightUnitorInv> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv' type=kotlin.Any? origin=null + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv' type=foo.bar.Nat.rightUnitorInv, A of foo.bar.endoFunctorComposeTensor..rightUnitorInv> origin=null ARG b: CALL 'public final fun identityFunctor (c: foo.bar.Category): foo.bar.Functor> declared in foo.bar' type=foo.bar.Functor> origin=null TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor ARG c: GET_VAR 'k: foo.bar.Category declared in foo.bar.endoFunctorComposeTensor' type=foo.bar.Category origin=null - ARG block: FUN_EXPR type=kotlin.Function2.rightUnitorInv>, foo.bar.Functor>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG block: FUN_EXPR type=kotlin.Function2.rightUnitorInv>, foo.bar.Functor>, foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#1 index:0 type:foo.bar.Functor.rightUnitorInv> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.rightUnitorInv>, $context-Functor#2: foo.bar.Functor>): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : BLOCK type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL - CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.rightUnitorInv, kotlin.Any?>] - thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> - PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor.rightUnitorInv> visibility:private [final] - EXPRESSION_BODY - CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.rightUnitorInv> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.rightUnitorInv, A of foo.bar.endoFunctorComposeTensor..rightUnitorInv> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.rightUnitorInv, A of foo.bar.endoFunctorComposeTensor..rightUnitorInv> - GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv' type=kotlin.Any? origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor.rightUnitorInv> - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor.rightUnitorInv> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor.rightUnitorInv> visibility:private [final]' type=foo.bar.Functor.rightUnitorInv> origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv...' type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null - PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor.rightUnitorInv>, $context-Functor#2: foo.bar.Functor>): foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv' + BLOCK type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.rightUnitorInv, kotlin.Any?>] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> + PROPERTY name:firstFunctor visibility:public modality:OPEN [val] + overridden: + public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor.rightUnitorInv> visibility:private [final] + EXPRESSION_BODY + CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.rightUnitorInv> origin=GET_PROPERTY + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv' type=foo.bar.Nat.rightUnitorInv, A of foo.bar.endoFunctorComposeTensor..rightUnitorInv> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor.rightUnitorInv> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> + correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] overridden: - public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..rightUnitorInv - TYPE_ARG G: io.github.kyay10.highkt.Id<*> - ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.rightUnitorInv> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv.' type=foo.bar.Functor.rightUnitorInv> origin=null - ARG g: GET_VAR '$context-Functor#2: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv.' type=foo.bar.Functor> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> - correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv..' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null - receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv...' type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null - CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> [primary] + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.rightUnitorInv, kotlin.Any?>]' type=kotlin.Unit - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun hashCode (): kotlin.Int declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun toString (): kotlin.String declared in foo.bar.Nat - FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] - TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor.rightUnitorInv> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor.rightUnitorInv> visibility:private [final]' type=foo.bar.Functor.rightUnitorInv> origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv...' type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null + PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + overridden: + public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG E: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..rightUnitorInv + TYPE_ARG G: io.github.kyay10.highkt.Id<*> + ARG f: GET_VAR '$context-Functor#1: foo.bar.Functor.rightUnitorInv> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv.' type=foo.bar.Functor.rightUnitorInv> origin=null + ARG g: GET_VAR '$context-Functor#2: foo.bar.Functor> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv.' type=foo.bar.Functor> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> - VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] overridden: - public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv..' - CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor - TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..rightUnitorInv - TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..rightUnitorInv...get - TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..rightUnitorInv...get - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.rightUnitorInv> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv.' type=foo.bar.Functor.rightUnitorInv> origin=null - ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv...get' type=kotlin.Any? origin=null - CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv..' type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv..' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final]' type=foo.bar.Functor origin=null + receiver: GET_VAR ': foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv...' type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=null + CONSTRUCTOR visibility:public returnType:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat.rightUnitorInv, kotlin.Any?>]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in foo.bar.Nat + FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] + TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> + VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + overridden: + public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv..' + CALL 'public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG C: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG D: Cat of foo.bar.endoFunctorComposeTensor + TYPE_ARG F: A of foo.bar.endoFunctorComposeTensor..rightUnitorInv + TYPE_ARG A: X of foo.bar.endoFunctorComposeTensor..rightUnitorInv...get + TYPE_ARG B: X of foo.bar.endoFunctorComposeTensor..rightUnitorInv...get + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor.rightUnitorInv> declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv.' type=foo.bar.Functor.rightUnitorInv> origin=null + ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv...get' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.endoFunctorComposeTensor..rightUnitorInv..' type=foo.bar.endoFunctorComposeTensor..rightUnitorInv...rightUnitorInv, Cat of foo.bar.endoFunctorComposeTensor> origin=OBJECT_LITERAL PROPERTY DELEGATED_MEMBER name:firstCategory visibility:public modality:OPEN [val] overridden: public abstract firstCategory: foo.bar.Category declared in foo.bar.TensorProduct @@ -1836,9 +1723,6 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_PARAMETER name:D index:1 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:Context name:cd index:0 type:foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'cd: foo.bar.Category declared in foo.bar.functorCategory' type=foo.bar.Category origin=null RETURN type=kotlin.Nothing from='public final fun functorCategory (cd: foo.bar.Category): foo.bar.Category declared in foo.bar' BLOCK type=foo.bar.functorCategory. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Category] @@ -1860,7 +1744,7 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun toString (): kotlin.String declared in foo.bar.Category - FUN name:compose visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:compose visibility:public modality:OPEN returnType:kotlin.Any? [infix] TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:G index:1 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:H index:2 variance: superTypes:[kotlin.Any?] reified:false @@ -1870,35 +1754,25 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun compose (: kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.compose, G of foo.bar.functorCategory..compose> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Any? declared in foo.bar.functorCategory..compose' type=kotlin.Any? origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..compose' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun compose (: kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar.functorCategory.' - CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any - TYPE_ARG R: kotlin.Any? + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> origin=null + TYPE_ARG T: foo.bar.Category + TYPE_ARG R: foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> ARG with: GET_VAR 'cd: foo.bar.Category declared in foo.bar.functorCategory' type=foo.bar.Category origin=null - ARG block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Any index:0 type:kotlin.Any + ARG block: FUN_EXPR type=kotlin.Function1, foo.bar.Nat.compose, H of foo.bar.functorCategory..compose>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Category index:0 type:foo.bar.Category BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Any: kotlin.Any): kotlin.Any? declared in foo.bar.functorCategory..compose' - CALL 'public final fun vertical ($context-Category: foo.bar.Category, : foo.bar.Nat, other: foo.bar.Nat): foo.bar.Nat declared in foo.bar' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='local final fun ($context-Category: foo.bar.Category): foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> declared in foo.bar.functorCategory..compose' + CALL 'public final fun vertical ($context-Category: foo.bar.Category, : foo.bar.Nat, other: foo.bar.Nat): foo.bar.Nat declared in foo.bar' type=foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> origin=null TYPE_ARG C: C of foo.bar.functorCategory TYPE_ARG D: D of foo.bar.functorCategory TYPE_ARG F: F of foo.bar.functorCategory..compose TYPE_ARG G: G of foo.bar.functorCategory..compose TYPE_ARG H: H of foo.bar.functorCategory..compose - ARG $context-Category: GET_VAR '$context-Any: kotlin.Any declared in foo.bar.functorCategory..compose.' type=kotlin.Any origin=null - ARG : TYPE_OP type=foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..compose' type=kotlin.Any? origin=null - ARG other: TYPE_OP type=foo.bar.Nat.compose, G of foo.bar.functorCategory..compose> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.compose, G of foo.bar.functorCategory..compose> - GET_VAR 'g: kotlin.Any? declared in foo.bar.functorCategory..compose' type=kotlin.Any? origin=null + ARG $context-Category: GET_VAR '$context-Category: foo.bar.Category declared in foo.bar.functorCategory..compose.' type=foo.bar.Category origin=null + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..compose' type=foo.bar.Nat.compose, H of foo.bar.functorCategory..compose> origin=null + ARG other: GET_VAR 'g: kotlin.Any? declared in foo.bar.functorCategory..compose' type=foo.bar.Nat.compose, G of foo.bar.functorCategory..compose> origin=null FUN name:source visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.functorCategory. @@ -1906,23 +1780,18 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun source (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.source, *> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..source' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun source (: kotlin.Any?): kotlin.Any? declared in foo.bar.functorCategory.' - CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Iso.source, F of foo.bar.functorCategory..source> origin=null TYPE_ARG T: foo.bar.Functor.source> - TYPE_ARG R: kotlin.Any? + TYPE_ARG R: foo.bar.Iso.source, F of foo.bar.functorCategory..source> ARG with: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.source> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.source, *> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.source, *> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..source' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG block: FUN_EXPR type=kotlin.Function1.source>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..source' type=foo.bar.Nat.source, *> origin=IMPLICIT_ARGUMENT + ARG block: FUN_EXPR type=kotlin.Function1.source>, foo.bar.Iso.source, F of foo.bar.functorCategory..source>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Iso.source, F of foo.bar.functorCategory..source> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor.source> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor.source>): kotlin.Any? declared in foo.bar.functorCategory..source' - CALL 'public final fun identityNat (functor: foo.bar.Functor): foo.bar.Iso declared in foo.bar' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor.source>): foo.bar.Iso.source, F of foo.bar.functorCategory..source> declared in foo.bar.functorCategory..source' + CALL 'public final fun identityNat (functor: foo.bar.Functor): foo.bar.Iso declared in foo.bar' type=foo.bar.Iso.source, F of foo.bar.functorCategory..source> origin=null TYPE_ARG C: C of foo.bar.functorCategory TYPE_ARG D: D of foo.bar.functorCategory TYPE_ARG F: F of foo.bar.functorCategory..source @@ -1934,23 +1803,18 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun target (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Nat.target> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..target' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun target (: kotlin.Any?): kotlin.Any? declared in foo.bar.functorCategory.' - CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=foo.bar.Iso.target, F of foo.bar.functorCategory..target> origin=null TYPE_ARG T: foo.bar.Functor.target> - TYPE_ARG R: kotlin.Any? + TYPE_ARG R: foo.bar.Iso.target, F of foo.bar.functorCategory..target> ARG with: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor.target> origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Nat.target> origin=IMPLICIT_CAST typeOperand=foo.bar.Nat.target> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..target' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG block: FUN_EXPR type=kotlin.Function1.target>, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.functorCategory..target' type=foo.bar.Nat.target> origin=IMPLICIT_ARGUMENT + ARG block: FUN_EXPR type=kotlin.Function1.target>, foo.bar.Iso.target, F of foo.bar.functorCategory..target>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Iso.target, F of foo.bar.functorCategory..target> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor.target> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor.target>): kotlin.Any? declared in foo.bar.functorCategory..target' - CALL 'public final fun identityNat (functor: foo.bar.Functor): foo.bar.Iso declared in foo.bar' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor.target>): foo.bar.Iso.target, F of foo.bar.functorCategory..target> declared in foo.bar.functorCategory..target' + CALL 'public final fun identityNat (functor: foo.bar.Functor): foo.bar.Iso declared in foo.bar' type=foo.bar.Iso.target, F of foo.bar.functorCategory..target> origin=null TYPE_ARG C: C of foo.bar.functorCategory TYPE_ARG D: D of foo.bar.functorCategory TYPE_ARG F: F of foo.bar.functorCategory..target @@ -1964,15 +1828,6 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Category#2 index:1 type:foo.bar.Category VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Category#3 index:2 type:foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '$context-Category#1: foo.bar.Category declared in foo.bar.functorComposeFunctor' type=foo.bar.Category origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '$context-Category#2: foo.bar.Category declared in foo.bar.functorComposeFunctor' type=foo.bar.Category origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '$context-Category#3: foo.bar.Category declared in foo.bar.functorComposeFunctor' type=foo.bar.Category origin=null RETURN type=kotlin.Nothing from='public final fun functorComposeFunctor ($context-Category#1: foo.bar.Category, $context-Category#2: foo.bar.Category, $context-Category#3: foo.bar.Category): foo.bar.Functor> declared in foo.bar' BLOCK type=foo.bar.functorComposeFunctor. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Functor>] @@ -1982,10 +1837,10 @@ FILE fqName:foo.bar fileName:/category.kt public abstract firstCategory: foo.bar.Category declared in foo.bar.Functor FIELD PROPERTY_BACKING_FIELD name:firstCategory type:foo.bar.Category visibility:private [final] EXPRESSION_BODY - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=foo.bar.Category origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.Category origin=null TYPE_ARG A: foo.bar.Category TYPE_ARG B: foo.bar.Category - TYPE_ARG Result: foo.bar.Category + TYPE_ARG R: foo.bar.Category ARG a: CALL 'public final fun functorCategory (cd: foo.bar.Category): foo.bar.Category declared in foo.bar' type=foo.bar.Category origin=null TYPE_ARG C: D of foo.bar.functorComposeFunctor TYPE_ARG D: E of foo.bar.functorComposeFunctor @@ -2057,12 +1912,8 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun lift (f: kotlin.Any?): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair, foo.bar.Nat> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Any? declared in foo.bar.functorComposeFunctor..lift' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun lift (f: kotlin.Any?): kotlin.Any? declared in foo.bar.functorComposeFunctor.' - CALL 'public final fun horizontal (: foo.bar.Nat, other: foo.bar.Nat): foo.bar.Nat declared in foo.bar' type=kotlin.Any? origin=null + CALL 'public final fun horizontal (: foo.bar.Nat, other: foo.bar.Nat): foo.bar.Nat declared in foo.bar' type=foo.bar.Nat origin=null TYPE_ARG C: C of foo.bar.functorComposeFunctor TYPE_ARG D: D of foo.bar.functorComposeFunctor TYPE_ARG E: E of foo.bar.functorComposeFunctor @@ -2070,12 +1921,10 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_ARG G: kotlin.Any? TYPE_ARG I: kotlin.Any? TYPE_ARG J: kotlin.Any? - ARG : CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=foo.bar.Nat origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair, foo.bar.Nat> origin=IMPLICIT_CAST typeOperand=kotlin.Pair, foo.bar.Nat> - GET_VAR 'f: kotlin.Any? declared in foo.bar.functorComposeFunctor..lift' type=kotlin.Any? origin=null - ARG other: CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=foo.bar.Nat origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair, foo.bar.Nat> origin=IMPLICIT_CAST typeOperand=kotlin.Pair, foo.bar.Nat> - GET_VAR 'f: kotlin.Any? declared in foo.bar.functorComposeFunctor..lift' type=kotlin.Any? origin=null + ARG : CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY + ARG : GET_VAR 'f: kotlin.Any? declared in foo.bar.functorComposeFunctor..lift' type=kotlin.Pair origin=null + ARG other: CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY + ARG : GET_VAR 'f: kotlin.Any? declared in foo.bar.functorComposeFunctor..lift' type=kotlin.Pair origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.functorComposeFunctor.' type=foo.bar.functorComposeFunctor. origin=OBJECT_LITERAL FUN name:horizontal visibility:public modality:FINAL returnType:foo.bar.Nat [infix] TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -2088,12 +1937,6 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:foo.bar.Nat VALUE_PARAMETER kind:Regular name:other index:1 type:foo.bar.Nat BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'other: foo.bar.Nat declared in foo.bar.horizontal' type=foo.bar.Nat origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': foo.bar.Nat declared in foo.bar.horizontal' type=foo.bar.Nat origin=null RETURN type=kotlin.Nothing from='public final fun horizontal (: foo.bar.Nat, other: foo.bar.Nat): foo.bar.Nat declared in foo.bar' BLOCK type=foo.bar.horizontal. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat] @@ -2103,10 +1946,10 @@ FILE fqName:foo.bar fileName:/category.kt public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor visibility:private [final] EXPRESSION_BODY - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null TYPE_ARG A: foo.bar.Functor TYPE_ARG B: foo.bar.Functor - TYPE_ARG Result: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor origin=GET_PROPERTY ARG : GET_VAR ': foo.bar.Nat declared in foo.bar.horizontal' type=foo.bar.Nat origin=null ARG b: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor origin=GET_PROPERTY @@ -2139,10 +1982,10 @@ FILE fqName:foo.bar fileName:/category.kt public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor visibility:private [final] EXPRESSION_BODY - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null TYPE_ARG A: foo.bar.Functor TYPE_ARG B: foo.bar.Functor - TYPE_ARG Result: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor ARG a: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor origin=GET_PROPERTY ARG : GET_VAR ': foo.bar.Nat declared in foo.bar.horizontal' type=foo.bar.Nat origin=null ARG b: CALL 'public abstract fun (): foo.bar.Functor declared in foo.bar.Nat' type=foo.bar.Functor origin=GET_PROPERTY @@ -2227,9 +2070,6 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:Context name:c index:0 type:foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'c: foo.bar.Category declared in foo.bar.identityFunctor' type=foo.bar.Category origin=null RETURN type=kotlin.Nothing from='public final fun identityFunctor (c: foo.bar.Category): foo.bar.Functor> declared in foo.bar' BLOCK type=foo.bar.identityFunctor. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Functor>] @@ -2290,9 +2130,7 @@ FILE fqName:foo.bar fileName:/category.kt public abstract fun lift (f: kotlin.Any?): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun lift (f: kotlin.Any?): kotlin.Any? declared in foo.bar.identityFunctor.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : GET_VAR 'f: kotlin.Any? declared in foo.bar.identityFunctor..lift' type=kotlin.Any? origin=null + GET_VAR 'f: kotlin.Any? declared in foo.bar.identityFunctor..lift' type=kotlin.Any? origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.identityFunctor.' type=foo.bar.identityFunctor. origin=OBJECT_LITERAL FUN name:identityNat visibility:public modality:FINAL returnType:foo.bar.Iso TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -2300,9 +2138,6 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_PARAMETER name:F index:2 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:Context name:functor index:0 type:foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'functor: foo.bar.Functor declared in foo.bar.identityNat' type=foo.bar.Functor origin=null VAR name:nat type:foo.bar.identityNat. [val] BLOCK type=foo.bar.identityNat. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat] @@ -2371,9 +2206,6 @@ FILE fqName:foo.bar fileName:/category.kt ARG functor: GET_VAR 'functor: foo.bar.Functor declared in foo.bar.identityNat' type=foo.bar.Functor origin=null ARG f: GET_VAR 'c: kotlin.Any? declared in foo.bar.identityNat..get' type=kotlin.Any? origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.identityNat.' type=foo.bar.identityNat. origin=OBJECT_LITERAL - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val nat: foo.bar.identityNat. declared in foo.bar.identityNat' type=foo.bar.identityNat. origin=null RETURN type=kotlin.Nothing from='public final fun identityNat (functor: foo.bar.Functor): foo.bar.Iso declared in foo.bar' CALL 'public final fun Iso (to: foo.bar.Nat, from: foo.bar.Nat): foo.bar.Iso declared in foo.bar' type=foo.bar.Iso origin=null TYPE_ARG C: C of foo.bar.identityNat @@ -2391,32 +2223,25 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:Context name:functor index:0 type:foo.bar.Functor VALUE_PARAMETER kind:Regular name:f index:1 type:kotlin.Any? BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'functor: foo.bar.Functor declared in foo.bar.lift' type=foo.bar.Functor origin=null RETURN type=kotlin.Nothing from='public final fun lift (functor: foo.bar.Functor, f: kotlin.Any?): kotlin.Any? declared in foo.bar' CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with declared in kotlin' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any + TYPE_ARG T: foo.bar.Functor TYPE_ARG R: kotlin.Any? ARG receiver: GET_VAR 'functor: foo.bar.Functor declared in foo.bar.lift' type=foo.bar.Functor origin=null - ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1 origin=LAMBDA + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1, kotlin.Any?> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:kotlin.Any + VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:foo.bar.Functor BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($this$with: kotlin.Any): kotlin.Any? declared in foo.bar.lift' + RETURN type=kotlin.Nothing from='local final fun ($this$with: foo.bar.Functor): kotlin.Any? declared in foo.bar.lift' CALL 'public abstract fun lift (f: kotlin.Any?): kotlin.Any? declared in foo.bar.Functor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.lift TYPE_ARG B: B of foo.bar.lift - ARG : TYPE_OP type=foo.bar.Functor origin=IMPLICIT_CAST typeOperand=foo.bar.Functor - GET_VAR '$this$with: kotlin.Any declared in foo.bar.lift.' type=kotlin.Any origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '$this$with: foo.bar.Functor declared in foo.bar.lift.' type=foo.bar.Functor origin=IMPLICIT_ARGUMENT ARG f: GET_VAR 'f: kotlin.Any? declared in foo.bar.lift' type=kotlin.Any? origin=null FUN name:oppositeCategory visibility:public modality:FINAL returnType:foo.bar.Category TYPE_PARAMETER name:Cat index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:Context name:c index:0 type:foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'c: foo.bar.Category declared in foo.bar.oppositeCategory' type=foo.bar.Category origin=null RETURN type=kotlin.Nothing from='public final fun oppositeCategory (c: foo.bar.Category): foo.bar.Category declared in foo.bar' BLOCK type=foo.bar.oppositeCategory. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Category] @@ -2438,7 +2263,7 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun toString (): kotlin.String declared in foo.bar.Category - FUN name:compose visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:compose visibility:public modality:OPEN returnType:kotlin.Any? [infix] TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:C index:2 variance: superTypes:[kotlin.Any?] reified:false @@ -2448,12 +2273,6 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun compose (: kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Any? declared in foo.bar.oppositeCategory..compose' type=kotlin.Any? origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.oppositeCategory..compose' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun compose (: kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar.oppositeCategory.' CALL 'public final fun compose (category: foo.bar.Category, : kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG Cat: Cat of foo.bar.oppositeCategory @@ -2470,9 +2289,6 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun source (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.oppositeCategory..source' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun source (: kotlin.Any?): kotlin.Any? declared in foo.bar.oppositeCategory.' CALL 'public final fun target (category: foo.bar.Category, : kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG Cat: Cat of foo.bar.oppositeCategory @@ -2486,9 +2302,6 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun target (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.oppositeCategory..target' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun target (: kotlin.Any?): kotlin.Any? declared in foo.bar.oppositeCategory.' CALL 'public final fun source (category: foo.bar.Category, : kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG Cat: Cat of foo.bar.oppositeCategory @@ -2502,12 +2315,6 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Category#1 index:0 type:foo.bar.Category VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Category#2 index:1 type:foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '$context-Category#1: foo.bar.Category declared in foo.bar.productCategory' type=foo.bar.Category origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '$context-Category#2: foo.bar.Category declared in foo.bar.productCategory' type=foo.bar.Category origin=null RETURN type=kotlin.Nothing from='public final fun productCategory ($context-Category#1: foo.bar.Category, $context-Category#2: foo.bar.Category): foo.bar.Category declared in foo.bar' BLOCK type=foo.bar.productCategory. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Category] @@ -2529,7 +2336,7 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun toString (): kotlin.String declared in foo.bar.Category - FUN name:compose visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:compose visibility:public modality:OPEN returnType:kotlin.Any? [infix] TYPE_PARAMETER name:PA index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:PB index:1 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:PC index:2 variance: superTypes:[kotlin.Any?] reified:false @@ -2539,16 +2346,8 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun compose (: kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Any? origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun compose (: kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar.productCategory.' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: kotlin.Any? TYPE_ARG B: kotlin.Any? ARG : CALL 'public final fun compose (category: foo.bar.Category, : kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -2558,11 +2357,9 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_ARG C: kotlin.Any? ARG category: GET_VAR '$context-Category#1: foo.bar.Category declared in foo.bar.productCategory' type=foo.bar.Category origin=null ARG : CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Pair origin=IMPLICIT_ARGUMENT ARG g: CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'g: kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Any? origin=null + ARG : GET_VAR 'g: kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Pair origin=null ARG that: CALL 'public final fun compose (category: foo.bar.Category, : kotlin.Any?, g: kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG Cat: C2 of foo.bar.productCategory TYPE_ARG A: kotlin.Any? @@ -2570,11 +2367,9 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_ARG C: kotlin.Any? ARG category: GET_VAR '$context-Category#2: foo.bar.Category declared in foo.bar.productCategory' type=foo.bar.Category origin=null ARG : CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Pair origin=IMPLICIT_ARGUMENT ARG g: CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'g: kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Any? origin=null + ARG : GET_VAR 'g: kotlin.Any? declared in foo.bar.productCategory..compose' type=kotlin.Pair origin=null FUN name:source visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:P index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.productCategory. @@ -2582,12 +2377,8 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun source (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..source' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun source

(: kotlin.Any?): kotlin.Any? declared in foo.bar.productCategory.' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: kotlin.Any? TYPE_ARG B: kotlin.Any? ARG : CALL 'public final fun source (category: foo.bar.Category, : kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -2595,15 +2386,13 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_ARG A: kotlin.Any? ARG category: GET_VAR '$context-Category#1: foo.bar.Category declared in foo.bar.productCategory' type=foo.bar.Category origin=null ARG : CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..source' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..source' type=kotlin.Pair origin=IMPLICIT_ARGUMENT ARG that: CALL 'public final fun source (category: foo.bar.Category, : kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG Cat: C2 of foo.bar.productCategory TYPE_ARG A: kotlin.Any? ARG category: GET_VAR '$context-Category#2: foo.bar.Category declared in foo.bar.productCategory' type=foo.bar.Category origin=null ARG : CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..source' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..source' type=kotlin.Pair origin=IMPLICIT_ARGUMENT FUN name:target visibility:public modality:OPEN returnType:kotlin.Any? TYPE_PARAMETER name:P index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.productCategory. @@ -2611,12 +2400,8 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun target (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..target' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun target

(: kotlin.Any?): kotlin.Any? declared in foo.bar.productCategory.' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: kotlin.Any? TYPE_ARG B: kotlin.Any? ARG : CALL 'public final fun target (category: foo.bar.Category, : kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -2624,15 +2409,13 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_ARG A: kotlin.Any? ARG category: GET_VAR '$context-Category#1: foo.bar.Category declared in foo.bar.productCategory' type=foo.bar.Category origin=null ARG : CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..target' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..target' type=kotlin.Pair origin=IMPLICIT_ARGUMENT ARG that: CALL 'public final fun target (category: foo.bar.Category, : kotlin.Any?): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG Cat: C2 of foo.bar.productCategory TYPE_ARG A: kotlin.Any? ARG category: GET_VAR '$context-Category#2: foo.bar.Category declared in foo.bar.productCategory' type=foo.bar.Category origin=null ARG : CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..target' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.productCategory..target' type=kotlin.Pair origin=IMPLICIT_ARGUMENT CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.productCategory.' type=foo.bar.productCategory. origin=OBJECT_LITERAL FUN name:source visibility:public modality:FINAL returnType:kotlin.Any? TYPE_PARAMETER name:Cat index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -2653,7 +2436,7 @@ FILE fqName:foo.bar fileName:/category.kt CALL 'public abstract fun source (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.source ARG (index:0): GET_VAR '$this$with: foo.bar.Category declared in foo.bar.source.' type=foo.bar.Category origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.source' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.source' type=kotlin.Any? origin=null FUN name:target visibility:public modality:FINAL returnType:kotlin.Any? TYPE_PARAMETER name:Cat index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:A index:1 variance: superTypes:[kotlin.Any?] reified:false @@ -2673,14 +2456,11 @@ FILE fqName:foo.bar fileName:/category.kt CALL 'public abstract fun target (: kotlin.Any?): kotlin.Any? declared in foo.bar.Category' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.target ARG (index:0): GET_VAR '$this$with: foo.bar.Category declared in foo.bar.target.' type=foo.bar.Category origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.target' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.target' type=kotlin.Any? origin=null FUN name:toNormalFunctor visibility:public modality:FINAL returnType:foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalFunctor> TYPE_PARAMETER name:M index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:foo.bar.UsualMonad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalFunctor' type=foo.bar.UsualMonad origin=null RETURN type=kotlin.Nothing from='public final fun toNormalFunctor (: foo.bar.UsualMonad): foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalFunctor> declared in foo.bar' BLOCK type=foo.bar.toNormalFunctor. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalFunctor>] @@ -2688,32 +2468,32 @@ FILE fqName:foo.bar fileName:/category.kt PROPERTY name:firstCategory visibility:public modality:OPEN [val] overridden: public abstract firstCategory: foo.bar.Category declared in foo.bar.Functor - FIELD PROPERTY_BACKING_FIELD name:firstCategory type:foo.bar.Category> visibility:private [final] + FIELD PROPERTY_BACKING_FIELD name:firstCategory type:foo.bar.ArrowCategory visibility:private [final] EXPRESSION_BODY GET_OBJECT 'CLASS OBJECT name:ArrowCategory modality:FINAL visibility:public superTypes:[foo.bar.Category>]' type=foo.bar.ArrowCategory - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Category> + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.ArrowCategory VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalFunctor. correspondingProperty: PROPERTY name:firstCategory visibility:public modality:OPEN [val] overridden: public abstract fun (): foo.bar.Category declared in foo.bar.Functor BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Category> declared in foo.bar.toNormalFunctor.' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstCategory type:foo.bar.Category> visibility:private [final]' type=foo.bar.Category> origin=null + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.ArrowCategory declared in foo.bar.toNormalFunctor.' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstCategory type:foo.bar.ArrowCategory visibility:private [final]' type=foo.bar.ArrowCategory origin=null receiver: GET_VAR ': foo.bar.toNormalFunctor. declared in foo.bar.toNormalFunctor..' type=foo.bar.toNormalFunctor. origin=null PROPERTY name:secondCategory visibility:public modality:OPEN [val] overridden: public abstract secondCategory: foo.bar.Category declared in foo.bar.Functor - FIELD PROPERTY_BACKING_FIELD name:secondCategory type:foo.bar.Category> visibility:private [final] + FIELD PROPERTY_BACKING_FIELD name:secondCategory type:foo.bar.ArrowCategory visibility:private [final] EXPRESSION_BODY GET_OBJECT 'CLASS OBJECT name:ArrowCategory modality:FINAL visibility:public superTypes:[foo.bar.Category>]' type=foo.bar.ArrowCategory - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Category> + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.ArrowCategory VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalFunctor. correspondingProperty: PROPERTY name:secondCategory visibility:public modality:OPEN [val] overridden: public abstract fun (): foo.bar.Category declared in foo.bar.Functor BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Category> declared in foo.bar.toNormalFunctor.' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondCategory type:foo.bar.Category> visibility:private [final]' type=foo.bar.Category> origin=null + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.ArrowCategory declared in foo.bar.toNormalFunctor.' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondCategory type:foo.bar.ArrowCategory visibility:private [final]' type=foo.bar.ArrowCategory origin=null receiver: GET_VAR ': foo.bar.toNormalFunctor. declared in foo.bar.toNormalFunctor..' type=foo.bar.toNormalFunctor. origin=null CONSTRUCTOR visibility:public returnType:foo.bar.toNormalFunctor. [primary] BLOCK_BODY @@ -2740,48 +2520,38 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun lift (f: kotlin.Any?): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1.lift, B of foo.bar.toNormalFunctor..lift> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Any? declared in foo.bar.toNormalFunctor..lift' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun lift (f: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalFunctor.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalFunctor..lift' - CALL 'public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.UsualMonad' type=kotlin.Any? origin=null - TYPE_ARG A: A of foo.bar.toNormalFunctor..lift - TYPE_ARG B: B of foo.bar.toNormalFunctor..lift - ARG (index:0): GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalFunctor' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR 'it: kotlin.Any? declared in foo.bar.toNormalFunctor..lift.' type=kotlin.Any? origin=null - ARG f: FUN_EXPR type=kotlin.Function1.lift, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:A of foo.bar.toNormalFunctor..lift - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: A of foo.bar.toNormalFunctor..lift): kotlin.Any? declared in foo.bar.toNormalFunctor..lift.' - CALL 'public abstract fun pure (a: A of foo.bar.UsualMonad.pure): kotlin.Any? declared in foo.bar.UsualMonad' type=kotlin.Any? origin=null - TYPE_ARG A: B of foo.bar.toNormalFunctor..lift - ARG : GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalFunctor' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT - ARG a: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.toNormalFunctor..lift origin=INVOKE - ARG : TYPE_OP type=kotlin.Function1.lift, B of foo.bar.toNormalFunctor..lift> origin=IMPLICIT_CAST typeOperand=kotlin.Function1.lift, B of foo.bar.toNormalFunctor..lift> - GET_VAR 'f: kotlin.Any? declared in foo.bar.toNormalFunctor..lift' type=kotlin.Any? origin=null - ARG p1: GET_VAR 'it: A of foo.bar.toNormalFunctor..lift declared in foo.bar.toNormalFunctor..lift..' type=A of foo.bar.toNormalFunctor..lift origin=null + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:ma index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (ma: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalFunctor..lift' + CALL 'public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.UsualMonad' type=kotlin.Any? origin=null + TYPE_ARG A: A of foo.bar.toNormalFunctor..lift + TYPE_ARG B: B of foo.bar.toNormalFunctor..lift + ARG (index:0): GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalFunctor' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR 'ma: kotlin.Any? declared in foo.bar.toNormalFunctor..lift.' type=kotlin.Any? origin=null + ARG f: FUN_EXPR type=kotlin.Function1.lift, kotlin.Any?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:it index:0 type:A of foo.bar.toNormalFunctor..lift + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: A of foo.bar.toNormalFunctor..lift): kotlin.Any? declared in foo.bar.toNormalFunctor..lift.' + CALL 'public abstract fun pure (a: A of foo.bar.UsualMonad.pure): kotlin.Any? declared in foo.bar.UsualMonad' type=kotlin.Any? origin=null + TYPE_ARG A: B of foo.bar.toNormalFunctor..lift + ARG : GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalFunctor' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT + ARG a: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.toNormalFunctor..lift origin=INVOKE + ARG : GET_VAR 'f: kotlin.Any? declared in foo.bar.toNormalFunctor..lift' type=kotlin.Function1.lift, B of foo.bar.toNormalFunctor..lift> origin=VARIABLE_AS_FUNCTION + ARG p1: GET_VAR 'it: A of foo.bar.toNormalFunctor..lift declared in foo.bar.toNormalFunctor..lift..' type=A of foo.bar.toNormalFunctor..lift origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.toNormalFunctor.' type=foo.bar.toNormalFunctor. origin=OBJECT_LITERAL FUN name:toNormalMonad visibility:public modality:FINAL returnType:foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toNormalMonad> TYPE_PARAMETER name:M index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:foo.bar.UsualMonad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalMonad' type=foo.bar.UsualMonad origin=null RETURN type=kotlin.Nothing from='public final fun toNormalMonad (: foo.bar.UsualMonad): foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toNormalMonad> declared in foo.bar' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=foo.bar.toNormalMonad.. origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.toNormalMonad.. origin=null TYPE_ARG A: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> TYPE_ARG B: foo.bar.ArrowCategory - TYPE_ARG Result: foo.bar.toNormalMonad.. + TYPE_ARG R: foo.bar.toNormalMonad.. ARG a: CALL 'public final fun toNormalFunctor (: foo.bar.UsualMonad): foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalFunctor> declared in foo.bar' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null TYPE_ARG M: M of foo.bar.toNormalMonad ARG : GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalMonad' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT @@ -2936,12 +2706,12 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public open fun toString (): kotlin.String declared in foo.bar.MonoidObject public open fun toString (): kotlin.String declared in foo.bar.TensorProduct - FUN name:empty visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:empty visibility:public modality:OPEN returnType:foo.bar.toNormalMonad...empty. VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalMonad.. overridden: public abstract fun empty (): kotlin.Any? declared in foo.bar.MonoidObject BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun empty (): kotlin.Any? declared in foo.bar.toNormalMonad..' + RETURN type=kotlin.Nothing from='public open fun empty (): foo.bar.toNormalMonad...empty. declared in foo.bar.toNormalMonad..' BLOCK type=foo.bar.toNormalMonad...empty. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat, kotlin.Function1<*, *>, io.github.kyay10.highkt.Id<*>, M of foo.bar.toNormalMonad>] thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.toNormalMonad...empty. @@ -3003,121 +2773,107 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1..empty..get, A of foo.bar.toNormalMonad...empty..get> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'c: kotlin.Any? declared in foo.bar.toNormalMonad...empty..get' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalMonad...empty.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : FUN_EXPR type=kotlin.Function1..empty..get, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:a index:0 type:A of foo.bar.toNormalMonad...empty..get - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (a: A of foo.bar.toNormalMonad...empty..get): kotlin.Any? declared in foo.bar.toNormalMonad...empty..get' - CALL 'public abstract fun pure (a: A of foo.bar.UsualMonad.pure): kotlin.Any? declared in foo.bar.UsualMonad' type=kotlin.Any? origin=null - TYPE_ARG A: A of foo.bar.toNormalMonad...empty..get - ARG : GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalMonad' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT - ARG a: GET_VAR 'a: A of foo.bar.toNormalMonad...empty..get declared in foo.bar.toNormalMonad...empty..get.' type=A of foo.bar.toNormalMonad...empty..get origin=null + FUN_EXPR type=kotlin.Function1..empty..get, kotlin.Any?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:a index:0 type:A of foo.bar.toNormalMonad...empty..get + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (a: A of foo.bar.toNormalMonad...empty..get): kotlin.Any? declared in foo.bar.toNormalMonad...empty..get' + CALL 'public abstract fun pure (a: A of foo.bar.UsualMonad.pure): kotlin.Any? declared in foo.bar.UsualMonad' type=kotlin.Any? origin=null + TYPE_ARG A: A of foo.bar.toNormalMonad...empty..get + ARG : GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalMonad' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT + ARG a: GET_VAR 'a: A of foo.bar.toNormalMonad...empty..get declared in foo.bar.toNormalMonad...empty..get.' type=A of foo.bar.toNormalMonad...empty..get origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.toNormalMonad...empty.' type=foo.bar.toNormalMonad...empty. origin=OBJECT_LITERAL - FUN name:plus visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:plus visibility:public modality:OPEN returnType:foo.bar.toNormalMonad...plus. VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalMonad.. overridden: public abstract fun plus (): kotlin.Any? declared in foo.bar.MonoidObject BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun plus (): kotlin.Any? declared in foo.bar.toNormalMonad..' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : BLOCK type=foo.bar.toNormalMonad...plus. origin=OBJECT_LITERAL - CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat, kotlin.Function1<*, *>, kotlin.Any?, M of foo.bar.toNormalMonad>] - thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.toNormalMonad...plus. - PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> origin=null - TYPE_ARG C: kotlin.Function1<*, *> - TYPE_ARG D: kotlin.Function1<*, *> - TYPE_ARG E: kotlin.Function1<*, *> - TYPE_ARG F: M of foo.bar.toNormalMonad - TYPE_ARG G: M of foo.bar.toNormalMonad - ARG f: GET_VAR '$context-Functor: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> declared in foo.bar.toNormalMonad.' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null - ARG g: GET_VAR '$context-Functor: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> declared in foo.bar.toNormalMonad.' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalMonad...plus. - correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> declared in foo.bar.toNormalMonad...plus.' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> visibility:private [final]' type=foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> origin=null - receiver: GET_VAR ': foo.bar.toNormalMonad...plus. declared in foo.bar.toNormalMonad...plus..' type=foo.bar.toNormalMonad...plus. origin=null - PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + RETURN type=kotlin.Nothing from='public open fun plus (): foo.bar.toNormalMonad...plus. declared in foo.bar.toNormalMonad..' + BLOCK type=foo.bar.toNormalMonad...plus. origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat, kotlin.Function1<*, *>, kotlin.Any?, M of foo.bar.toNormalMonad>] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.toNormalMonad...plus. + PROPERTY name:firstFunctor visibility:public modality:OPEN [val] + overridden: + public abstract firstFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun composeFunctors (f: foo.bar.Functor, g: foo.bar.Functor): foo.bar.Functor declared in foo.bar' type=foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> origin=null + TYPE_ARG C: kotlin.Function1<*, *> + TYPE_ARG D: kotlin.Function1<*, *> + TYPE_ARG E: kotlin.Function1<*, *> + TYPE_ARG F: M of foo.bar.toNormalMonad + TYPE_ARG G: M of foo.bar.toNormalMonad + ARG f: GET_VAR '$context-Functor: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> declared in foo.bar.toNormalMonad.' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null + ARG g: GET_VAR '$context-Functor: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> declared in foo.bar.toNormalMonad.' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalMonad...plus. + correspondingProperty: PROPERTY name:firstFunctor visibility:public modality:OPEN [val] overridden: - public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat - FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> visibility:private [final] - EXPRESSION_BODY - CALL 'public final fun contextOf (context: @[NoInfer] A of kotlin.contextOf): @[NoInfer] A of kotlin.contextOf declared in kotlin' type=@[NoInfer] foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null - TYPE_ARG A: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> - ARG context: GET_VAR '$context-Functor: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> declared in foo.bar.toNormalMonad.' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalMonad...plus. - correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] - overridden: - public abstract fun (): foo.bar.Functor declared in foo.bar.Nat - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> declared in foo.bar.toNormalMonad...plus.' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> visibility:private [final]' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null - receiver: GET_VAR ': foo.bar.toNormalMonad...plus. declared in foo.bar.toNormalMonad...plus..' type=foo.bar.toNormalMonad...plus. origin=null - CONSTRUCTOR visibility:public returnType:foo.bar.toNormalMonad...plus. [primary] + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat, kotlin.Function1<*, *>, kotlin.Any?, M of foo.bar.toNormalMonad>]' type=kotlin.Unit - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun hashCode (): kotlin.Int declared in foo.bar.Nat - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] - VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any - overridden: - public open fun toString (): kotlin.String declared in foo.bar.Nat - FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] - TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> declared in foo.bar.toNormalMonad...plus.' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:firstFunctor type:foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> visibility:private [final]' type=foo.bar.Functor, kotlin.Function1<*, *>, kotlin.Any?> origin=null + receiver: GET_VAR ': foo.bar.toNormalMonad...plus. declared in foo.bar.toNormalMonad...plus..' type=foo.bar.toNormalMonad...plus. origin=null + PROPERTY name:secondFunctor visibility:public modality:OPEN [val] + overridden: + public abstract secondFunctor: foo.bar.Functor declared in foo.bar.Nat + FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun contextOf (context: @[NoInfer] A of kotlin.contextOf): @[NoInfer] A of kotlin.contextOf declared in kotlin' type=@[NoInfer] foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null + TYPE_ARG A: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> + ARG context: GET_VAR '$context-Functor: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> declared in foo.bar.toNormalMonad.' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalMonad...plus. - VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + correspondingProperty: PROPERTY name:secondFunctor visibility:public modality:OPEN [val] overridden: - public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + public abstract fun (): foo.bar.Functor declared in foo.bar.Nat BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1..plus..get, A of foo.bar.toNormalMonad...plus..get> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'c: kotlin.Any? declared in foo.bar.toNormalMonad...plus..get' type=kotlin.Any? origin=null - RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalMonad...plus.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:mma index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (mma: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalMonad...plus..get' - CALL 'public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.UsualMonad' type=kotlin.Any? origin=null - TYPE_ARG A: kotlin.Any? - TYPE_ARG B: A of foo.bar.toNormalMonad...plus..get - ARG (index:0): GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalMonad' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR 'mma: kotlin.Any? declared in foo.bar.toNormalMonad...plus..get.' type=kotlin.Any? origin=null - ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:ma index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (ma: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalMonad...plus..get.' - GET_VAR 'ma: kotlin.Any? declared in foo.bar.toNormalMonad...plus..get..' type=kotlin.Any? origin=null - CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.toNormalMonad...plus.' type=foo.bar.toNormalMonad...plus. origin=OBJECT_LITERAL + RETURN type=kotlin.Nothing from='public open fun (): foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> declared in foo.bar.toNormalMonad...plus.' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:secondFunctor type:foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> visibility:private [final]' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toNormalMonad> origin=null + receiver: GET_VAR ': foo.bar.toNormalMonad...plus. declared in foo.bar.toNormalMonad...plus..' type=foo.bar.toNormalMonad...plus. origin=null + CONSTRUCTOR visibility:public returnType:foo.bar.toNormalMonad...plus. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat, kotlin.Function1<*, *>, kotlin.Any?, M of foo.bar.toNormalMonad>]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in foo.bar.Nat + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in foo.bar.Nat + FUN name:get visibility:public modality:OPEN returnType:kotlin.Any? [operator] + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.toNormalMonad...plus. + VALUE_PARAMETER kind:Regular name:c index:1 type:kotlin.Any? + overridden: + public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalMonad...plus.' + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:mma index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (mma: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalMonad...plus..get' + CALL 'public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.UsualMonad' type=kotlin.Any? origin=null + TYPE_ARG A: kotlin.Any? + TYPE_ARG B: A of foo.bar.toNormalMonad...plus..get + ARG (index:0): GET_VAR ': foo.bar.UsualMonad declared in foo.bar.toNormalMonad' type=foo.bar.UsualMonad origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR 'mma: kotlin.Any? declared in foo.bar.toNormalMonad...plus..get.' type=kotlin.Any? origin=null + ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:ma index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (ma: kotlin.Any?): kotlin.Any? declared in foo.bar.toNormalMonad...plus..get.' + GET_VAR 'ma: kotlin.Any? declared in foo.bar.toNormalMonad...plus..get..' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.toNormalMonad...plus.' type=foo.bar.toNormalMonad...plus. origin=OBJECT_LITERAL PROPERTY DELEGATED_MEMBER name:firstCategory visibility:public modality:OPEN [val] overridden: public abstract firstCategory: foo.bar.Category declared in foo.bar.MonoidObject @@ -3168,9 +2924,6 @@ FILE fqName:foo.bar fileName:/category.kt TYPE_PARAMETER name:M index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad> BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad> declared in foo.bar.toUsualMonad' type=foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad> origin=null RETURN type=kotlin.Nothing from='public final fun toUsualMonad (: foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad>): foo.bar.UsualMonad declared in foo.bar' BLOCK type=foo.bar.toUsualMonad. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.UsualMonad] @@ -3201,9 +2954,6 @@ FILE fqName:foo.bar fileName:/category.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.UsualMonad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.bind, kotlin.Any?> declared in foo.bar.toUsualMonad..bind' type=kotlin.Function1.bind, kotlin.Any?> origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1.bind, kotlin.Any?>): kotlin.Any? declared in foo.bar.toUsualMonad.' CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null TYPE_ARG T: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toUsualMonad> @@ -3226,15 +2976,13 @@ FILE fqName:foo.bar fileName:/category.kt ARG functor: GET_VAR '$context-Functor: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toUsualMonad> declared in foo.bar.toUsualMonad..bind.' type=foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toUsualMonad> origin=null ARG f: GET_VAR 'f: kotlin.Function1.bind, kotlin.Any?> declared in foo.bar.toUsualMonad..bind' type=kotlin.Function1.bind, kotlin.Any?> origin=null ARG p1: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.toUsualMonad..bind' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=null RETURN type=kotlin.Nothing from='local final fun ($context-Functor: foo.bar.Functor, kotlin.Function1<*, *>, M of foo.bar.toUsualMonad>): kotlin.Any? declared in foo.bar.toUsualMonad..bind' CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.Any? origin=INVOKE - ARG : CALL 'public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat' type=kotlin.Function1 origin=null + ARG : CALL 'public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat' type=kotlin.Function1 origin=GET_ARRAY_ELEMENT TYPE_ARG A: B of foo.bar.toUsualMonad..bind ARG : CALL 'public abstract fun plus (): kotlin.Any? declared in foo.bar.MonoidObject' type=foo.bar.Nat, kotlin.Function1<*, *>, kotlin.Any?, M of foo.bar.toUsualMonad> origin=null ARG : GET_VAR ': foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad> declared in foo.bar.toUsualMonad' type=foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad> origin=IMPLICIT_ARGUMENT - ARG c: CALL 'public final fun idArrow (): kotlin.Function1 declared in foo.bar' type=kotlin.Any? origin=null + ARG c: CALL 'public final fun idArrow (): kotlin.Function1 declared in foo.bar' type=kotlin.Function1.bind, B of foo.bar.toUsualMonad..bind> origin=null TYPE_ARG A: B of foo.bar.toUsualMonad..bind ARG p1: GET_VAR 'val mapped: kotlin.Any? declared in foo.bar.toUsualMonad..bind.' type=kotlin.Any? origin=null FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? @@ -3246,11 +2994,11 @@ FILE fqName:foo.bar fileName:/category.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.toUsualMonad..pure): kotlin.Any? declared in foo.bar.toUsualMonad.' CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.Any? origin=INVOKE - ARG : CALL 'public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat' type=kotlin.Function1.pure, kotlin.Any?> origin=null + ARG : CALL 'public abstract fun get (c: kotlin.Any?): kotlin.Any? declared in foo.bar.Nat' type=kotlin.Function1.pure, kotlin.Any?> origin=GET_ARRAY_ELEMENT TYPE_ARG A: A of foo.bar.toUsualMonad..pure ARG : CALL 'public abstract fun empty (): kotlin.Any? declared in foo.bar.MonoidObject' type=foo.bar.Nat, kotlin.Function1<*, *>, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad> origin=null ARG : GET_VAR ': foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad> declared in foo.bar.toUsualMonad' type=foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, M of foo.bar.toUsualMonad> origin=IMPLICIT_ARGUMENT - ARG c: CALL 'public final fun idArrow (): kotlin.Function1 declared in foo.bar' type=kotlin.Any? origin=null + ARG c: CALL 'public final fun idArrow (): kotlin.Function1 declared in foo.bar' type=kotlin.Function1.pure, A of foo.bar.toUsualMonad..pure> origin=null TYPE_ARG A: A of foo.bar.toUsualMonad..pure ARG p1: GET_VAR 'a: A of foo.bar.toUsualMonad..pure declared in foo.bar.toUsualMonad..pure' type=A of foo.bar.toUsualMonad..pure origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.toUsualMonad.' type=foo.bar.toUsualMonad. origin=OBJECT_LITERAL @@ -3264,15 +3012,6 @@ FILE fqName:foo.bar fileName:/category.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:foo.bar.Nat VALUE_PARAMETER kind:Regular name:other index:2 type:foo.bar.Nat BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '$context-Category: foo.bar.Category declared in foo.bar.vertical' type=foo.bar.Category origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'other: foo.bar.Nat declared in foo.bar.vertical' type=foo.bar.Nat origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': foo.bar.Nat declared in foo.bar.vertical' type=foo.bar.Nat origin=null RETURN type=kotlin.Nothing from='public final fun vertical ($context-Category: foo.bar.Category, : foo.bar.Nat, other: foo.bar.Nat): foo.bar.Nat declared in foo.bar' BLOCK type=foo.bar.vertical. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[foo.bar.Nat] @@ -3381,6 +3120,11 @@ FILE fqName:foo.bar fileName:/category.kt TYPEALIAS name:Monad visibility:public expandedType:foo.bar.MonoidObject, io.github.kyay10.highkt.Id<*>, F of foo.bar.Monad> TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:F index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:MorphismProducted visibility:public expandedType:kotlin.Pair + TYPE_PARAMETER name:C1 index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:C2 index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:PA index:2 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:PB index:3 variance: superTypes:[kotlin.Any?] reified:false TYPEALIAS name:NatK visibility:public expandedType:kotlin.Any? TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:D index:1 variance: superTypes:[kotlin.Any?] reified:false diff --git a/compiler-plugin/testData/box/category.fir.txt b/compiler-plugin/testData/box/category.fir.txt index aa03a8e..c5ebacc 100644 --- a/compiler-plugin/testData/box/category.fir.txt +++ b/compiler-plugin/testData/box/category.fir.txt @@ -3,7 +3,7 @@ FILE: category.kt public final typealias Obj = R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, A>| public abstract interface Category : R|kotlin/Any| { - public abstract fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, C>|.compose(g: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, C>| + public abstract infix fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, C>|.compose(g: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, C>| public abstract fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, *>|.source(): R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>| @@ -36,25 +36,20 @@ FILE: category.kt public final typealias Opp = R|io/github/kyay10/highkt/K, Arr>| context(c: R|foo/bar/Category|) public final fun oppositeCategory(): R|foo/bar/Category<{foo/bar/Opp=} io/github/kyay10/highkt/K, Cat>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, Cat>|>(R|/c|) ^oppositeCategory object : R|foo/bar/Category>| { private constructor(): R|foo/bar/| { super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/Opp=} io/github/kyay10/highkt/K, Cat>, B, C>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, B>, C>|.compose(g: R|{io/github/kyay10/highkt/K2<{foo/bar/Opp=} io/github/kyay10/highkt/K, Cat>, A, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, A>, B>|): R|{io/github/kyay10/highkt/K2<{foo/bar/Opp=} io/github/kyay10/highkt/K, Cat>, A, C>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, A>, C>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} io/github/kyay10/highkt/K, A>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} io/github/kyay10/highkt/K, B>|>(this@R|foo/bar/.compose|) + public open override infix fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.compose(g: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, A>|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, A>| { ^compose context(R|/c|) R|/g|.R|foo/bar/compose|(this@R|foo/bar/.compose|) } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/Opp=} io/github/kyay10/highkt/K, Cat>, A, *>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, A>, *>|.source(): R|{foo/bar/Obj<{foo/bar/Opp=} io/github/kyay10/highkt/K, Cat>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, A>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} io/github/kyay10/highkt/K, A>|>(this@R|foo/bar/.source|) + public open override fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, A>|.source(): R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>| { ^source context(R|/c|) this@R|foo/bar/.source|.R|foo/bar/target|() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/Opp=} io/github/kyay10/highkt/K, Cat>, *, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, *>, A>|.target(): R|{foo/bar/Obj<{foo/bar/Opp=} io/github/kyay10/highkt/K, Cat>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, A>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} io/github/kyay10/highkt/K, *>|>(this@R|foo/bar/.target|) + public open override fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, *>|.target(): R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>| { ^target context(R|/c|) this@R|foo/bar/.target|.R|foo/bar/source|() } @@ -63,7 +58,7 @@ FILE: category.kt } public final typealias Arrow = R|(A) -> B| public final typealias ArrowK = R|{foo/bar/Arrow<*, *>=} (*) -> *| - public final fun idArrow(): R|{foo/bar/Arrow=} (A) -> A| { + public final fun idArrow(): R|(A) -> A| { ^idArrow fun (a: R|A|): R|A| { ^ R|/a| } @@ -74,22 +69,18 @@ FILE: category.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/ArrowK=} kotlin/Function1<*, *>, B, C>=} io/github/kyay10/highkt/K, B>, C>|.compose(g: R|{io/github/kyay10/highkt/K2<{foo/bar/ArrowK=} kotlin/Function1<*, *>, A, B>=} io/github/kyay10/highkt/K, A>, B>|): R|{io/github/kyay10/highkt/K2<{foo/bar/ArrowK=} kotlin/Function1<*, *>, A, C>=} io/github/kyay10/highkt/K, A>, C>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| B|, R|io/github/kyay10/highkt/K, A>, B>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| C|, R|io/github/kyay10/highkt/K, B>, C>|>(this@R|foo/bar/ArrowCategory.compose|) + public open override infix fun R|(B) -> C|.compose(g: R|(A) -> B|): R|(A) -> C| { ^compose fun (a: R|A|): R|C| { ^ this@R|foo/bar/ArrowCategory.compose|.R|SubstitutionOverride|(R|/g|.R|SubstitutionOverride|(R|/a|)) } - .R|io/github/kyay10/highkt/expandTo|, A, C>=} io/github/kyay10/highkt/K, A>, C>|>() + } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/ArrowK=} kotlin/Function1<*, *>, A, *>=} io/github/kyay10/highkt/K, A>, *>|.source(): R|{foo/bar/Obj<{foo/bar/ArrowK=} kotlin/Function1<*, *>, A>=} io/github/kyay10/highkt/K, A>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| *|, R|io/github/kyay10/highkt/K, A>, *>|>(this@R|foo/bar/ArrowCategory.source|) + public open override fun R|{foo/bar/Arrow=} (A) -> *|.source(): R|(A) -> A| { ^source R|foo/bar/idArrow|() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/ArrowK=} kotlin/Function1<*, *>, *, A>=} io/github/kyay10/highkt/K, *>, A>|.target(): R|{foo/bar/Obj<{foo/bar/ArrowK=} kotlin/Function1<*, *>, A>=} io/github/kyay10/highkt/K, A>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| A|, R|io/github/kyay10/highkt/K, *>, A>|>(this@R|foo/bar/ArrowCategory.target|) + public open override fun R|{foo/bar/Arrow<*, A>=} (*) -> A|.target(): R|(A) -> A| { ^target R|foo/bar/idArrow|() } @@ -105,29 +96,24 @@ FILE: category.kt public final typealias TypePairSecond

= R|io/github/kyay10/highkt/K>| @R|io/github/kyay10/highkt/TypeFunction|() public abstract interface MorphismProduct : R|{io/github/kyay10/highkt/K2, {io/github/kyay10/highkt/K2, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/K2, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>| { } + public final typealias MorphismProducted = R|kotlin/Pair<{io/github/kyay10/highkt/K2, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>| public final typealias Product = R|{io/github/kyay10/highkt/K2, C1, C2>=} io/github/kyay10/highkt/K, C1>, C2>| context(: R|foo/bar/Category|, : R|foo/bar/Category|) public final fun productCategory(): R|foo/bar/Category<{foo/bar/Product=} io/github/kyay10/highkt/K, C1>, C2>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C1>|>(R|/|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C2>|>(R|/|) ^productCategory object : R|foo/bar/Category>| { private constructor(): R|foo/bar/| { super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/Product=} io/github/kyay10/highkt/K, C1>, C2>, PB, PC>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C1>, C2>, PB>, PC>|.compose(g: R|{io/github/kyay10/highkt/K2<{foo/bar/Product=} io/github/kyay10/highkt/K, C1>, C2>, PA, PB>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C1>, C2>, PA>, PB>|): R|{io/github/kyay10/highkt/K2<{foo/bar/Product=} io/github/kyay10/highkt/K, C1>, C2>, PA, PC>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C1>, C2>, PA>, PC>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>|, R|io/github/kyay10/highkt/K, {io/github/kyay10/highkt/K2, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>|, R|io/github/kyay10/highkt/K, {io/github/kyay10/highkt/K2, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>|>(this@R|foo/bar/.compose|) + public open override infix fun R|{foo/bar/MorphismProducted=} kotlin/Pair<{io/github/kyay10/highkt/K2, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>|.compose(g: R|{foo/bar/MorphismProducted=} kotlin/Pair<{io/github/kyay10/highkt/K2, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>>|): R|kotlin/Pair<{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K>, {foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>>, {io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K>, {foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>>>| { ^compose context(R|/|) this@R|foo/bar/.compose|.R|SubstitutionOverride, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>|>|.R|foo/bar/compose|=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>|>(R|/g|.R|SubstitutionOverride, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst>|>|).R|kotlin/to|=} io/github/kyay10/highkt/K>, {foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>>|, R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K>, {foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>>|>(context(R|/|) this@R|foo/bar/.compose|.R|SubstitutionOverride, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>|>|.R|foo/bar/compose|=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>|>(R|/g|.R|SubstitutionOverride, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond>|>|)) } - public open override fun

R|{io/github/kyay10/highkt/K2<{foo/bar/Product=} io/github/kyay10/highkt/K, C1>, C2>, P, *>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C1>, C2>, P>, *>|.source(): R|{foo/bar/Obj<{foo/bar/Product=} io/github/kyay10/highkt/K, C1>, C2>, P>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C1>, C2>, P>, P>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, foo/bar/TypePairFirst<*>>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst<*>>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond<*>>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond<*>>>|, R|io/github/kyay10/highkt/K, {io/github/kyay10/highkt/K2, foo/bar/TypePairFirst<*>>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst<*>>>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond<*>>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond<*>>>|>(this@R|foo/bar/.source|) + public open override fun

R|{foo/bar/MorphismProducted=} kotlin/Pair<{io/github/kyay10/highkt/K2, foo/bar/TypePairFirst<*>>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst<*>>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond<*>>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond<*>>>|.source(): R|kotlin/Pair<{foo/bar/Obj=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairFirst

=} io/github/kyay10/highkt/K>>, {foo/bar/Obj=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairSecond

=} io/github/kyay10/highkt/K>>>| { ^source context(R|/|) this@R|foo/bar/.source|.R|SubstitutionOverride, foo/bar/TypePairFirst<*>>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst<*>>|>|.R|foo/bar/source|=} io/github/kyay10/highkt/K>|>().R|kotlin/to|=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairFirst

=} io/github/kyay10/highkt/K>>|, R|{foo/bar/Obj=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairSecond

=} io/github/kyay10/highkt/K>>|>(context(R|/|) this@R|foo/bar/.source|.R|SubstitutionOverride, foo/bar/TypePairSecond<*>>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond<*>>|>|.R|foo/bar/source|=} io/github/kyay10/highkt/K>|>()) } - public open override fun

R|{io/github/kyay10/highkt/K2<{foo/bar/Product=} io/github/kyay10/highkt/K, C1>, C2>, *, P>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C1>, C2>, *>, P>|.target(): R|{foo/bar/Obj<{foo/bar/Product=} io/github/kyay10/highkt/K, C1>, C2>, P>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C1>, C2>, P>, P>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, foo/bar/TypePairFirst

>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst

>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond

>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond

>>|, R|io/github/kyay10/highkt/K, {io/github/kyay10/highkt/K2, foo/bar/TypePairFirst

>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst

>>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond

>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond

>>|>(this@R|foo/bar/.target|) + public open override fun

R|{foo/bar/MorphismProducted=} kotlin/Pair<{io/github/kyay10/highkt/K2, foo/bar/TypePairFirst

>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst

>, {io/github/kyay10/highkt/K2, foo/bar/TypePairSecond

>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond

>>|.target(): R|kotlin/Pair<{foo/bar/Obj=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairFirst

=} io/github/kyay10/highkt/K>>, {foo/bar/Obj=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairSecond

=} io/github/kyay10/highkt/K>>>| { ^target context(R|/|) this@R|foo/bar/.target|.R|SubstitutionOverride, foo/bar/TypePairFirst

>=} io/github/kyay10/highkt/K>, foo/bar/TypePairFirst

>|>|.R|foo/bar/target|=} io/github/kyay10/highkt/K>|>().R|kotlin/to|=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairFirst

=} io/github/kyay10/highkt/K>>|, R|{foo/bar/Obj=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairSecond

=} io/github/kyay10/highkt/K>>|>(context(R|/|) this@R|foo/bar/.target|.R|SubstitutionOverride, foo/bar/TypePairSecond

>=} io/github/kyay10/highkt/K>, foo/bar/TypePairSecond

>|>|.R|foo/bar/target|=} io/github/kyay10/highkt/K>|>()) } @@ -146,7 +132,6 @@ FILE: category.kt } context(c: R|foo/bar/Category|) public final fun identityFunctor(): R|foo/bar/Functor>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>|>(R|/c|) ^identityFunctor object : R|foo/bar/Functor>| { private constructor(): R|foo/bar/| { super() @@ -158,8 +143,8 @@ FILE: category.kt public open override val secondCategory: R|foo/bar/Category| = R|/c| public get(): R|foo/bar/Category| - public open override fun lift(f: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|): R|{io/github/kyay10/highkt/K2, A>, io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, B>>=} io/github/kyay10/highkt/K, A>>, io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, B>>| { - ^lift R|/f|.R|io/github/kyay10/highkt/expandTo|, A>, io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, B>>=} io/github/kyay10/highkt/K, A>>, io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, B>>|>() + public open override fun lift(f: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>| { + ^lift R|/f| } } @@ -170,8 +155,6 @@ FILE: category.kt public final typealias Compose = R|{io/github/kyay10/highkt/K2, F, G>=} io/github/kyay10/highkt/K, F>, G>| context(f: R|foo/bar/Functor|, g: R|foo/bar/Functor|) public final fun composeFunctors(): R|foo/bar/Functor=} io/github/kyay10/highkt/K, F>, G>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, D>, E>, F>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, G>|>(R|/g|) ^composeFunctors object : R|foo/bar/Functor>| { private constructor(): R|foo/bar/| { super() @@ -183,8 +166,8 @@ FILE: category.kt public open override val secondCategory: R|foo/bar/Category| = R|/f|.R|SubstitutionOverride|>| public get(): R|foo/bar/Category| - public open override fun lift(h: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, F>, G>, A>, io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, F>, G>, B>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, F>, G>, A>>, io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, F>, G>, B>>| { - ^lift context(R|/f|) R|foo/bar/lift||, R|io/github/kyay10/highkt/K|>(context(R|/g|) R|foo/bar/lift|(R|/h|)) + public open override fun lift(h: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|): R|{io/github/kyay10/highkt/K2>, io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K>>, io/github/kyay10/highkt/K>>| { + ^lift context(R|/f|) R|foo/bar/lift||, R|io/github/kyay10/highkt/K|>(R|/g|.R|SubstitutionOverride, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>|(R|/h|)) } } @@ -192,8 +175,7 @@ FILE: category.kt } context(functor: R|foo/bar/Functor|) public final fun lift(f: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, F>|>(R|/functor|) - ^lift R|kotlin/with|, C>, D>, F> & foo/bar/Functor)|, R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>(R|/functor|, = with@fun R|it(io/github/kyay10/highkt/K, C>, D>, F> & foo/bar/Functor)|.(): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { + ^lift R|kotlin/with||, R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>(R|/functor|, = with@fun R|foo/bar/Functor|.(): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^ this@R|special/anonymous|.R|SubstitutionOverride, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>|(R|/f|) } ) @@ -213,7 +195,6 @@ FILE: category.kt } public final typealias NatK = R|{io/github/kyay10/highkt/K2, C, D>=} io/github/kyay10/highkt/K, C>, D>| public final fun R|foo/bar/Nat|.at(h: R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, F>, G>|>(this@R|foo/bar/at|) ^at R|kotlin/context||, R|foo/bar/Category|, R|foo/bar/Category|, R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>(this@R|foo/bar/at|.R|SubstitutionOverride|>|, this@R|foo/bar/at|.R|SubstitutionOverride|>|.R|SubstitutionOverride|>|, this@R|foo/bar/at|.R|SubstitutionOverride|>|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|, : R|foo/bar/Category|, : R|foo/bar/Category|) context@fun (): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^ context(R|/|) this@R|foo/bar/at|.R|SubstitutionOverride=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>|(context(R|/|) R|/h|.R|foo/bar/target|()).R|foo/bar/compose||, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|>(context(R|/|) R|foo/bar/lift|(R|/h|)) } @@ -229,8 +210,6 @@ FILE: category.kt } public final fun Iso(to: R|foo/bar/Nat|, from: R|foo/bar/Nat|): R|foo/bar/Iso| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, F>, G>|>(R|/to|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, G>, F>|>(R|/from|) ^Iso object : R|foo/bar/Iso|, R|foo/bar/Nat| { private constructor(): R|foo/bar/| { super() @@ -245,8 +224,6 @@ FILE: category.kt } private final fun Iso(to: R|foo/bar/Nat|, from: R|foo/bar/Iso|): R|foo/bar/Iso| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, F>, G>|>(R|/to|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, G>, F>|>(R|/from|) ^Iso object : R|foo/bar/Iso|, R|foo/bar/Nat| { private constructor(): R|foo/bar/| { super() @@ -263,7 +240,6 @@ FILE: category.kt public final typealias IsoK = R|{io/github/kyay10/highkt/K2, C, D>=} io/github/kyay10/highkt/K, C>, D>| context(functor: R|foo/bar/Functor|) public final fun identityNat(): R|foo/bar/Iso| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, F>|>(R|/functor|) lval nat: R|foo/bar/| = object : R|foo/bar/Nat| { private constructor(): R|foo/bar/| { super() @@ -275,18 +251,15 @@ FILE: category.kt public open override val secondFunctor: R|foo/bar/Functor| = R|/functor| public get(): R|foo/bar/Functor| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>|): R|{foo/bar/Component=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^get context(R|/functor|) R|foo/bar/lift|(R|/c|) } } - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|<*, *, *>, C>, D>, F>|>(R|/nat|) ^identityNat R|foo/bar/Iso|(R|/nat|, R|/nat|) } public final infix fun R|foo/bar/Nat|.horizontal(other: R|foo/bar/Nat|): R|foo/bar/Nat=} io/github/kyay10/highkt/K, I>, F>, {foo/bar/Compose=} io/github/kyay10/highkt/K, J>, G>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, F>, G>|>(R|/other|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, D>, E>, I>, J>|>(this@R|foo/bar/horizontal|) ^horizontal object : R|foo/bar/Nat, foo/bar/Compose>| { private constructor(): R|foo/bar/| { super() @@ -304,7 +277,7 @@ FILE: category.kt ) public get(): R|foo/bar/Functor=} io/github/kyay10/highkt/K, J>, G>>| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>|): R|{foo/bar/Component=} io/github/kyay10/highkt/K, I>, F>, {foo/bar/Compose=} io/github/kyay10/highkt/K, J>, G>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, I>, F>, A>>, io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, J>, G>, A>>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>|): R|{io/github/kyay10/highkt/K2>, io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K>>, io/github/kyay10/highkt/K>>| { ^get this@R|foo/bar/horizontal|.R|foo/bar/at||, R|io/github/kyay10/highkt/K|>(R|/other|.R|foo/bar/at|(R|/c|)) } @@ -313,9 +286,6 @@ FILE: category.kt } context(: R|foo/bar/Category|) public final infix fun R|foo/bar/Nat|.vertical(other: R|foo/bar/Nat|): R|foo/bar/Nat| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, D>|>(R|/|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, F>, G>|>(R|/other|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>, D>, G>, H>|>(this@R|foo/bar/vertical|) ^vertical object : R|foo/bar/Nat| { private constructor(): R|foo/bar/| { super() @@ -327,7 +297,7 @@ FILE: category.kt public open override val secondFunctor: R|foo/bar/Functor| = this@R|foo/bar/vertical|.R|SubstitutionOverride|>| public get(): R|foo/bar/Functor| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>|): R|{foo/bar/Component=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, A>|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^get context(R|/|) this@R|foo/bar/vertical|.R|SubstitutionOverride=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>|(R|/c|).R|foo/bar/compose||, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|>(R|/other|.R|SubstitutionOverride=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>|(R|/c|)) } @@ -336,32 +306,27 @@ FILE: category.kt } context(cd: R|foo/bar/Category|) public final fun functorCategory(): R|foo/bar/Category<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, D>|>(R|/cd|) ^functorCategory object : R|foo/bar/Category>| { private constructor(): R|foo/bar/| { super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, G, H>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, G>, H>|.compose(g: R|{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F, G>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, G>|): R|{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F, H>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, H>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, C>, D>, F>, G>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, C>, D>, G>, H>|>(this@R|foo/bar/.compose|) - ^compose R|kotlin/context|, D> & foo/bar/Category)|, R|{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F, H>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, H>|>(R|/cd|, = context(: R|it(io/github/kyay10/highkt/K, D> & foo/bar/Category)|) context@fun (): R|{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F, H>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, H>| { + public open override infix fun R|foo/bar/Nat|.compose(g: R|foo/bar/Nat|): R|foo/bar/Nat| { + ^compose R|kotlin/context||, R|foo/bar/Nat|>(R|/cd|, = context(: R|foo/bar/Category|) context@fun (): R|foo/bar/Nat| { ^ context(R|/|) this@R|foo/bar/.compose|.R|foo/bar/vertical|(R|/g|) } ) } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F, *>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, *>|.source(): R|{foo/bar/Obj<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, F>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, C>, D>, F>, *>|>(this@R|foo/bar/.source|) - ^source R|kotlin/context||, R|{foo/bar/Obj<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, F>|>(this@R|foo/bar/.source|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|) context@fun (): R|{foo/bar/Obj<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, F>| { + public open override fun R|foo/bar/Nat|.source(): R|foo/bar/Iso| { + ^source R|kotlin/context||, R|foo/bar/Iso|>(this@R|foo/bar/.source|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|) context@fun (): R|foo/bar/Iso| { ^ context(R|/|) R|foo/bar/identityNat|() } ) } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, *, F>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, *>, F>|.target(): R|{foo/bar/Obj<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, F>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, C>, D>, *>, F>|>(this@R|foo/bar/.target|) - ^target R|kotlin/context||, R|{foo/bar/Obj<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, F>|>(this@R|foo/bar/.target|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|) context@fun (): R|{foo/bar/Obj<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, F>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, F>, F>| { + public open override fun R|foo/bar/Nat|.target(): R|foo/bar/Iso| { + ^target R|kotlin/context||, R|foo/bar/Iso|>(this@R|foo/bar/.target|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|) context@fun (): R|foo/bar/Iso| { ^ context(R|/|) R|foo/bar/identityNat|() } ) @@ -374,9 +339,6 @@ FILE: category.kt } context(: R|foo/bar/Category|, : R|foo/bar/Category|, : R|foo/bar/Category|) public final fun functorComposeFunctor(): R|foo/bar/Functor<{foo/bar/Product<{foo/bar/NatK=} io/github/kyay10/highkt/K, D>, E>, {foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>>=} io/github/kyay10/highkt/K, {foo/bar/NatK=} io/github/kyay10/highkt/K, D>, E>>, {foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>>, {foo/bar/NatK=} io/github/kyay10/highkt/K, C>, E>, foo/bar/FunctorCompose<*>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, C>|>(R|/|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, D>|>(R|/|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, E>|>(R|/|) ^functorComposeFunctor object : R|foo/bar/Functor, foo/bar/NatK>, foo/bar/NatK, foo/bar/FunctorCompose<*>>| { private constructor(): R|foo/bar/| { super() @@ -391,9 +353,8 @@ FILE: category.kt public open override val secondCategory: R|foo/bar/Category<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, E>>| = context(R|/|) R|foo/bar/functorCategory|() public get(): R|foo/bar/Category<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, E>>| - public open override fun lift(f: R|{io/github/kyay10/highkt/K2<{foo/bar/Product<{foo/bar/NatK=} io/github/kyay10/highkt/K, D>, E>, {foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>>=} io/github/kyay10/highkt/K, {foo/bar/NatK=} io/github/kyay10/highkt/K, D>, E>>, {foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>>, A, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, D>, E>, {foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>>=} io/github/kyay10/highkt/K, {foo/bar/NatK=} io/github/kyay10/highkt/K, D>, E>>, {foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>>, A>, B>|): R|{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, E>, io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, B>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, E>, io/github/kyay10/highkt/K, A>>, io/github/kyay10/highkt/K, B>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, foo/bar/TypePairFirst>, foo/bar/Nat, foo/bar/TypePairSecond>>|, R|io/github/kyay10/highkt/K, foo/bar/Nat, foo/bar/TypePairFirst>>, foo/bar/Nat, foo/bar/TypePairSecond>>|>(R|/f|) - ^lift R|/f|.R|SubstitutionOverride, foo/bar/TypePairFirst>|>|.R|foo/bar/horizontal|=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>|>(R|/f|.R|SubstitutionOverride, foo/bar/TypePairSecond>|>|) + public open override fun lift(f: R|{foo/bar/MorphismProducted<{foo/bar/NatK=} io/github/kyay10/highkt/K, D>, E>, {foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, A, B>=} kotlin/Pair<{io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, D>, E>, foo/bar/TypePairFirst, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, D>, E>, foo/bar/TypePairFirst>, foo/bar/TypePairFirst>, {io/github/kyay10/highkt/K2<{foo/bar/NatK=} io/github/kyay10/highkt/K, C>, D>, foo/bar/TypePairSecond, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, foo/bar/TypePairSecond>, foo/bar/TypePairSecond>>|): R|foo/bar/Nat=} io/github/kyay10/highkt/K>, {foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K, {foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>>, {foo/bar/Compose<{foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>, {foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>>=} io/github/kyay10/highkt/K, {foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>>, {foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>>>| { + ^lift R|/f|.R|SubstitutionOverride=} io/github/kyay10/highkt/K, D>, E>, foo/bar/TypePairFirst, foo/bar/TypePairFirst>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, D>, E>, foo/bar/TypePairFirst>, foo/bar/TypePairFirst>|>|.R|foo/bar/horizontal|=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairSecond=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>|, R|{foo/bar/TypePairFirst=} io/github/kyay10/highkt/K>|>(R|/f|.R|SubstitutionOverride=} io/github/kyay10/highkt/K, C>, D>, foo/bar/TypePairSecond, foo/bar/TypePairSecond>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, C>, D>, foo/bar/TypePairSecond>, foo/bar/TypePairSecond>|>|) } } @@ -418,7 +379,6 @@ FILE: category.kt } context(k: R|foo/bar/Category|) public final fun endoFunctorComposeTensor(): R|foo/bar/TensorProduct<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, foo/bar/FunctorCompose<*>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, Cat>|>(R|/k|) ^endoFunctorComposeTensor object : R|foo/bar/TensorProduct, foo/bar/FunctorCompose<*>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>|, R|foo/bar/Functor, foo/bar/EndoK>, foo/bar/EndoK, foo/bar/FunctorCompose<*>>| { private constructor(): R|foo/bar/| { super() @@ -426,15 +386,14 @@ FILE: category.kt private final field $$delegate_0: R|foo/bar/Functor, foo/bar/EndoK>, foo/bar/EndoK, foo/bar/FunctorCompose<*>>| = context(R|/k|, R|/k|, R|/k|) R|foo/bar/functorComposeFunctor|() - public open override val unitObject: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| = R|kotlin/context|>|, R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>|>(context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor>|) context@fun (): R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| { + public open override val unitObject: R|foo/bar/Iso, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| = R|kotlin/context|>|, R|foo/bar/Iso, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>|>(context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor>|) context@fun (): R|foo/bar/Iso, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| { ^ context(R|/|) R|foo/bar/identityNat||>() } ) - public get(): R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| + public get(): R|foo/bar/Iso, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| - public open override fun leftUnitor(a: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|>(R|/a|) - ^leftUnitor R|kotlin/context||, R|foo/bar/Functor>|, R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>, A>|>(R|/a|.R|SubstitutionOverride|>|, context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor|, : R|foo/bar/Functor>|) context@fun (): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>, A>| { + public open override fun leftUnitor(a: R|{foo/bar/Endo=} foo/bar/Nat|): R|foo/bar/| { + ^leftUnitor R|kotlin/context||, R|foo/bar/Functor>|, R|foo/bar/|>(R|/a|.R|SubstitutionOverride|>|, context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor|, : R|foo/bar/Functor>|) context@fun (): R|foo/bar/| { ^ object : R|foo/bar/Nat, A>, A>| { private constructor(): R|foo/bar/| { super() @@ -446,19 +405,18 @@ FILE: category.kt public open override val secondFunctor: R|foo/bar/Functor| = R|/a|.R|SubstitutionOverride|>| public get(): R|foo/bar/Functor| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{foo/bar/Component, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>, A, X>=} io/github/kyay10/highkt/K, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>, X>>, io/github/kyay10/highkt/K>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^get context(R|/|) R|foo/bar/lift|(R|/c|) } } - .R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>, A>|>() + } ) } - public open override fun leftUnitorInv(a: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|>(R|/a|) - ^leftUnitorInv R|kotlin/context||, R|foo/bar/Functor>|, R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>|>(R|/a|.R|SubstitutionOverride|>|, context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor|, : R|foo/bar/Functor>|) context@fun (): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>| { + public open override fun leftUnitorInv(a: R|{foo/bar/Endo=} foo/bar/Nat|): R|foo/bar/| { + ^leftUnitorInv R|kotlin/context||, R|foo/bar/Functor>|, R|foo/bar/|>(R|/a|.R|SubstitutionOverride|>|, context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor|, : R|foo/bar/Functor>|) context@fun (): R|foo/bar/| { ^ object : R|foo/bar/Nat, A>>| { private constructor(): R|foo/bar/| { super() @@ -470,19 +428,18 @@ FILE: category.kt public open override val secondFunctor: R|foo/bar/Functor, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>| = context(R|/|, R|/|) R|foo/bar/composeFunctors||, R|A|>() public get(): R|foo/bar/Functor, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{foo/bar/Component, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>, X>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K<{foo/bar/Compose<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>, X>>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^get context(R|/|) R|foo/bar/lift|(R|/c|) } } - .R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, Cat>, Cat>, A, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A>>>|>() + } ) } - public open override fun rightUnitor(a: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|>(R|/a|) - ^rightUnitor R|kotlin/context||, R|foo/bar/Functor>|, R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>, A>|>(R|/a|.R|SubstitutionOverride|>|, context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor|, : R|foo/bar/Functor>|) context@fun (): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>, A>| { + public open override fun rightUnitor(a: R|{foo/bar/Endo=} foo/bar/Nat|): R|foo/bar/| { + ^rightUnitor R|kotlin/context||, R|foo/bar/Functor>|, R|foo/bar/|>(R|/a|.R|SubstitutionOverride|>|, context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor|, : R|foo/bar/Functor>|) context@fun (): R|foo/bar/| { ^ object : R|foo/bar/Nat>, A>| { private constructor(): R|foo/bar/| { super() @@ -494,19 +451,18 @@ FILE: category.kt public open override val secondFunctor: R|foo/bar/Functor| = R|/a|.R|SubstitutionOverride|>| public get(): R|foo/bar/Functor| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{foo/bar/Component>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, A, X>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, X>>, io/github/kyay10/highkt/K>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^get context(R|/|) R|foo/bar/lift|(R|/c|) } } - .R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>, A>|>() + } ) } - public open override fun rightUnitorInv(a: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|>(R|/a|) - ^rightUnitorInv R|kotlin/context||, R|foo/bar/Functor>|, R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>|>(R|/a|.R|SubstitutionOverride|>|, context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor|, : R|foo/bar/Functor>|) context@fun (): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>| { + public open override fun rightUnitorInv(a: R|{foo/bar/Endo=} foo/bar/Nat|): R|foo/bar/| { + ^rightUnitorInv R|kotlin/context||, R|foo/bar/Functor>|, R|foo/bar/|>(R|/a|.R|SubstitutionOverride|>|, context(R|/k|) R|foo/bar/identityFunctor|(), = context(: R|foo/bar/Functor|, : R|foo/bar/Functor>|) context@fun (): R|foo/bar/| { ^ object : R|foo/bar/Nat>>| { private constructor(): R|foo/bar/| { super() @@ -518,21 +474,18 @@ FILE: category.kt public open override val secondFunctor: R|foo/bar/Functor>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>| = context(R|/|, R|/|) R|foo/bar/composeFunctors||>() public get(): R|foo/bar/Functor>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{foo/bar/Component>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, X>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K<{foo/bar/Compose>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, X>>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^get context(R|/|) R|foo/bar/lift|(R|/c|) } } - .R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, Cat>, Cat>, A, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair>=} io/github/kyay10/highkt/K, A>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>>|>() + } ) } - public open override fun associator(a: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|, b: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, B>, B>|, c: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, C>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, C>, C>|): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|>(R|/a|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, B>, B>|>(R|/b|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, C>, C>|>(R|/c|) - ^associator R|kotlin/context||, R|foo/bar/Functor|, R|foo/bar/Functor|, R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>|>(R|/a|.R|SubstitutionOverride|>|, R|/b|.R|SubstitutionOverride|>|, R|/c|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>| { + public open override fun associator(a: R|{foo/bar/Endo=} foo/bar/Nat|, b: R|{foo/bar/Endo=} foo/bar/Nat|, c: R|{foo/bar/Endo=} foo/bar/Nat|): R|foo/bar/| { + ^associator R|kotlin/context||, R|foo/bar/Functor|, R|foo/bar/Functor|, R|foo/bar/|>(R|/a|.R|SubstitutionOverride|>|, R|/b|.R|SubstitutionOverride|>|, R|/c|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|foo/bar/| { ^ object : R|foo/bar/Nat, C>, foo/bar/Compose>>| { private constructor(): R|foo/bar/| { super() @@ -550,21 +503,18 @@ FILE: category.kt ) public get(): R|foo/bar/Functor=} io/github/kyay10/highkt/K, B>, C>>=} io/github/kyay10/highkt/K, A>, {foo/bar/Compose=} io/github/kyay10/highkt/K, B>, C>>>| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{foo/bar/Component=} io/github/kyay10/highkt/K, A>, B>, C>=} io/github/kyay10/highkt/K, {foo/bar/Compose=} io/github/kyay10/highkt/K, A>, B>>, C>, {foo/bar/Compose=} io/github/kyay10/highkt/K, B>, C>>=} io/github/kyay10/highkt/K, A>, {foo/bar/Compose=} io/github/kyay10/highkt/K, B>, C>>, X>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, A>, B>, C>=} io/github/kyay10/highkt/K, {foo/bar/Compose=} io/github/kyay10/highkt/K, A>, B>>, C>, X>>, io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, B>, C>>=} io/github/kyay10/highkt/K, A>, {foo/bar/Compose=} io/github/kyay10/highkt/K, B>, C>>, X>>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{io/github/kyay10/highkt/K2>>, io/github/kyay10/highkt/K>>>=} io/github/kyay10/highkt/K>>>, io/github/kyay10/highkt/K>>>| { ^get context(R|/|) R|foo/bar/lift|>|, R|io/github/kyay10/highkt/K>|>(context(R|/|) R|foo/bar/lift||, R|io/github/kyay10/highkt/K|>(context(R|/|) R|foo/bar/lift|(R|/c|))) } } - .R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>|>() + } ) } - public open override fun associatorInv(a: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|, b: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, B>, B>|, c: R|{foo/bar/Obj<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, C>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, C>, C>|): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, A>, A>|>(R|/a|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, B>, B>|>(R|/b|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, Cat>, Cat>, C>, C>|>(R|/c|) - ^associatorInv R|kotlin/context||, R|foo/bar/Functor|, R|foo/bar/Functor|, R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>|>(R|/a|.R|SubstitutionOverride|>|, R|/b|.R|SubstitutionOverride|>|, R|/c|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>| { + public open override fun associatorInv(a: R|{foo/bar/Endo=} foo/bar/Nat|, b: R|{foo/bar/Endo=} foo/bar/Nat|, c: R|{foo/bar/Endo=} foo/bar/Nat|): R|foo/bar/| { + ^associatorInv R|kotlin/context||, R|foo/bar/Functor|, R|foo/bar/Functor|, R|foo/bar/|>(R|/a|.R|SubstitutionOverride|>|, R|/b|.R|SubstitutionOverride|>|, R|/c|.R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|foo/bar/| { ^ object : R|foo/bar/Nat>, foo/bar/Compose, C>>| { private constructor(): R|foo/bar/| { super() @@ -582,12 +532,12 @@ FILE: category.kt ) public get(): R|foo/bar/Functor=} io/github/kyay10/highkt/K, A>, B>, C>=} io/github/kyay10/highkt/K, {foo/bar/Compose=} io/github/kyay10/highkt/K, A>, B>>, C>>| - public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{foo/bar/Component=} io/github/kyay10/highkt/K, B>, C>>=} io/github/kyay10/highkt/K, A>, {foo/bar/Compose=} io/github/kyay10/highkt/K, B>, C>>, {foo/bar/Compose<{foo/bar/Compose=} io/github/kyay10/highkt/K, A>, B>, C>=} io/github/kyay10/highkt/K, {foo/bar/Compose=} io/github/kyay10/highkt/K, A>, B>>, C>, X>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, B>, C>>=} io/github/kyay10/highkt/K, A>, {foo/bar/Compose=} io/github/kyay10/highkt/K, B>, C>>, X>>, io/github/kyay10/highkt/K<{foo/bar/Compose<{foo/bar/Compose=} io/github/kyay10/highkt/K, A>, B>, C>=} io/github/kyay10/highkt/K, {foo/bar/Compose=} io/github/kyay10/highkt/K, A>, B>>, C>, X>>| { + public open override operator fun get(c: R|{foo/bar/Obj=} io/github/kyay10/highkt/K, X>|): R|{io/github/kyay10/highkt/K2>>, io/github/kyay10/highkt/K>>>=} io/github/kyay10/highkt/K>>>, io/github/kyay10/highkt/K>>>| { ^get context(R|/|) R|foo/bar/lift|>|, R|io/github/kyay10/highkt/K>|>(context(R|/|) R|foo/bar/lift||, R|io/github/kyay10/highkt/K|>(context(R|/|) R|foo/bar/lift|(R|/c|))) } } - .R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, Cat>, Cat>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>=} io/github/kyay10/highkt/K, A>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, B>, C>>>>>, io/github/kyay10/highkt/K, {foo/bar/TypePair, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>, C>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, A>, B>>>, C>>>|>() + } ) } @@ -610,7 +560,6 @@ FILE: category.kt } public final fun R|{foo/bar/NormalMonad=} foo/bar/MonoidObject, foo/bar/FunctorCompose<*>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, M>|.toUsualMonad(): R|foo/bar/UsualMonad| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} foo/bar/MonoidObject<*, *, *, *>, foo/bar/EndoK>, foo/bar/FunctorCompose<*>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, M>|>(this@R|foo/bar/toUsualMonad|) ^toUsualMonad object : R|foo/bar/UsualMonad| { private constructor(): R|foo/bar/| { super() @@ -621,16 +570,9 @@ FILE: category.kt } public open override fun R|io/github/kyay10/highkt/K|.bind(f: R|(A) -> io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, io/github/kyay10/highkt/K>|>(R|/f|) ^bind R|kotlin/context||, R|io/github/kyay10/highkt/K|>(this@R|foo/bar/toUsualMonad|.R|SubstitutionOverride, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>, M>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>>, M>|>|().R|SubstitutionOverride|>|, = context(: R|foo/bar/Functor|) context@fun (): R|io/github/kyay10/highkt/K| { lval mapped: R|io/github/kyay10/highkt/K>| = context(R|/|) R|foo/bar/lift| *|, R|{foo/bar/ArrowK=} (*) -> *|, R|M|, R|A|, R|io/github/kyay10/highkt/K|>(R|/f|).R|SubstitutionOverride>|>|(this@R|foo/bar/.bind|) - { - } - - { - } - - ^ this@R|foo/bar/toUsualMonad|.R|SubstitutionOverride, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>, M>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>>, M>|>|().R|SubstitutionOverride=} io/github/kyay10/highkt/K, M>, M>>, foo/bar/TypePairSecond<{foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>>=} io/github/kyay10/highkt/K, M>, M>, M, A>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, M>, M>>, foo/bar/TypePairSecond<{foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>>=} io/github/kyay10/highkt/K, M>, M>, A>>, io/github/kyay10/highkt/K>|>|(R|foo/bar/idArrow|()).R|SubstitutionOverride|>|(R|/mapped|) + ^ this@R|foo/bar/toUsualMonad|.R|SubstitutionOverride, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>, M>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>>, M>|>|().R|SubstitutionOverride, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>> ~>} io/github/kyay10/highkt/K, {foo/bar/TypePairFirst<{foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>> ~>} M>, {foo/bar/TypePairSecond<{foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>> ~>} M>, M, A>=} io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>> ~>} io/github/kyay10/highkt/K, {foo/bar/TypePairFirst<{foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>> ~>} M>, {foo/bar/TypePairSecond<{foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>> ~>} M>, A>>, io/github/kyay10/highkt/K>|>|(R|foo/bar/idArrow|()).R|SubstitutionOverride|>|(R|/mapped|) } ) } @@ -638,36 +580,33 @@ FILE: category.kt } } - public final fun R|foo/bar/UsualMonad|.toNormalFunctor(): R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, M>|>(this@R|foo/bar/toNormalFunctor|) + public final fun R|foo/bar/UsualMonad|.toNormalFunctor(): R|foo/bar/Functor<(*) -> *, (*) -> *, M>| { ^toNormalFunctor object : R|foo/bar/Functor| { private constructor(): R|foo/bar/| { super() } - public open override val firstCategory: R|foo/bar/Category<{foo/bar/ArrowK=} kotlin/Function1<*, *>>| = Q|foo/bar/ArrowCategory| - public get(): R|foo/bar/Category<{foo/bar/ArrowK=} kotlin/Function1<*, *>>| + public open override val firstCategory: R|foo/bar/ArrowCategory| = Q|foo/bar/ArrowCategory| + public get(): R|foo/bar/ArrowCategory| - public open override val secondCategory: R|foo/bar/Category<{foo/bar/ArrowK=} kotlin/Function1<*, *>>| = Q|foo/bar/ArrowCategory| - public get(): R|foo/bar/Category<{foo/bar/ArrowK=} kotlin/Function1<*, *>>| + public open override val secondCategory: R|foo/bar/ArrowCategory| = Q|foo/bar/ArrowCategory| + public get(): R|foo/bar/ArrowCategory| - public open override fun lift(f: R|{io/github/kyay10/highkt/K2<{foo/bar/ArrowK=} kotlin/Function1<*, *>, A, B>=} io/github/kyay10/highkt/K, A>, B>|): R|{io/github/kyay10/highkt/K2<{foo/bar/ArrowK=} kotlin/Function1<*, *>, io/github/kyay10/highkt/K, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| B|, R|io/github/kyay10/highkt/K, A>, B>|>(R|/f|) - ^lift fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { - ^ (this@R|foo/bar/toNormalFunctor|, R|/it|).R|SubstitutionOverride|>|( = bind@fun (it: R|A|): R|io/github/kyay10/highkt/K| { + public open override fun lift(f: R|(A) -> B|): R|(io/github/kyay10/highkt/K) -> io/github/kyay10/highkt/K| { + ^lift fun (ma: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { + ^ (this@R|foo/bar/toNormalFunctor|, R|/ma|).R|SubstitutionOverride|>|( = bind@fun (it: R|A|): R|io/github/kyay10/highkt/K| { ^ this@R|foo/bar/toNormalFunctor|.R|SubstitutionOverride|>|(R|/f|.R|SubstitutionOverride|(R|/it|)) } ) } - .R|io/github/kyay10/highkt/expandTo|, io/github/kyay10/highkt/K, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>() + } } } public final fun R|foo/bar/UsualMonad|.toNormalMonad(): R|{foo/bar/NormalMonad=} foo/bar/MonoidObject, foo/bar/FunctorCompose<*>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, M>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, M>|>(this@R|foo/bar/toNormalMonad|) - ^toNormalMonad R|kotlin/context|, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>|, R|foo/bar/ArrowCategory|, R|foo/bar/|>(this@R|foo/bar/toNormalMonad|.R|foo/bar/toNormalFunctor|(), Q|foo/bar/ArrowCategory|, = context(: R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>|, : R|foo/bar/ArrowCategory|) context@fun (): R|foo/bar/| { + ^toNormalMonad R|kotlin/context| *, (*) -> *, M>|, R|foo/bar/ArrowCategory|, R|foo/bar/|>(this@R|foo/bar/toNormalMonad|.R|foo/bar/toNormalFunctor|(), Q|foo/bar/ArrowCategory|, = context(: R|foo/bar/Functor<(*) -> *, (*) -> *, M>|, : R|foo/bar/ArrowCategory|) context@fun (): R|foo/bar/| { ^ object : R|{foo/bar/NormalMonad=} foo/bar/MonoidObject, foo/bar/FunctorCompose<*>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, M>|, R|foo/bar/TensorProduct, foo/bar/FunctorCompose<*>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| { private constructor(): R|foo/bar/| { super() @@ -675,55 +614,53 @@ FILE: category.kt private final field $$delegate_0: R|foo/bar/TensorProduct, foo/bar/FunctorCompose<*>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| = context(R|/|) R|foo/bar/endoFunctorComposeTensor| *|>() - public open override fun empty(): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK<{foo/bar/ArrowK=} kotlin/Function1<*, *>>=} io/github/kyay10/highkt/K, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, M>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, M>| { + public open override fun empty(): R|foo/bar/| { ^empty object : R|foo/bar/Nat, M>| { private constructor(): R|foo/bar/| { super() } - public open override val firstFunctor: R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| = context(R|/|) R|foo/bar/identityFunctor| *|>() - public get(): R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| + public open override val firstFunctor: R|foo/bar/Functor<(*) -> *, (*) -> *, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| = context(R|/|) R|foo/bar/identityFunctor| *|>() + public get(): R|foo/bar/Functor<(*) -> *, (*) -> *, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| - public open override val secondFunctor: R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>| = context(R|/|) R|kotlin/contextOf|, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>|>() - public get(): R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>| + public open override val secondFunctor: R|foo/bar/Functor<(*) -> *, (*) -> *, M>| = context(R|/|) R|kotlin/contextOf| *, (*) -> *, M>|>() + public get(): R|foo/bar/Functor<(*) -> *, (*) -> *, M>| - public open override operator fun get(c: R|{foo/bar/Obj<{foo/bar/ArrowK=} kotlin/Function1<*, *>, A>=} io/github/kyay10/highkt/K, A>, A>|): R|{foo/bar/Component<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, M, A>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>>, io/github/kyay10/highkt/K>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| A|, R|io/github/kyay10/highkt/K, A>, A>|>(R|/c|) + public open override operator fun get(c: R|(A) -> A|): R|(A) -> io/github/kyay10/highkt/K| { ^get context@fun (a: R|A|): R|io/github/kyay10/highkt/K| { ^ this@R|foo/bar/toNormalMonad|.R|SubstitutionOverride|>|(R|/a|) } - .R|io/github/kyay10/highkt/expandTo|, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, M, A>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>>, io/github/kyay10/highkt/K>|>() + } } } - public open override fun plus(): R|{io/github/kyay10/highkt/K2<{foo/bar/EndoK<{foo/bar/ArrowK=} kotlin/Function1<*, *>>=} io/github/kyay10/highkt/K, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>, M>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>>, M>| { + public open override fun plus(): R|foo/bar/| { ^plus object : R|foo/bar/Nat, M>| { private constructor(): R|foo/bar/| { super() } - public open override val firstFunctor: R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/Compose=} io/github/kyay10/highkt/K, M>, M>>| = context(R|/|, R|/|) R|foo/bar/composeFunctors| *|, R|{foo/bar/ArrowK=} (*) -> *|, R|{foo/bar/ArrowK=} (*) -> *|, R|M|, R|M|>() - public get(): R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/Compose=} io/github/kyay10/highkt/K, M>, M>>| + public open override val firstFunctor: R|foo/bar/Functor<(*) -> *, (*) -> *, {foo/bar/Compose=} io/github/kyay10/highkt/K, M>, M>>| = context(R|/|, R|/|) R|foo/bar/composeFunctors| *|, R|{foo/bar/ArrowK=} (*) -> *|, R|{foo/bar/ArrowK=} (*) -> *|, R|M|, R|M|>() + public get(): R|foo/bar/Functor<(*) -> *, (*) -> *, {foo/bar/Compose=} io/github/kyay10/highkt/K, M>, M>>| - public open override val secondFunctor: R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>| = context(R|/|) R|kotlin/contextOf|, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>|>() - public get(): R|foo/bar/Functor<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/ArrowK=} kotlin/Function1<*, *>, M>| + public open override val secondFunctor: R|foo/bar/Functor<(*) -> *, (*) -> *, M>| = context(R|/|) R|kotlin/contextOf| *, (*) -> *, M>|>() + public get(): R|foo/bar/Functor<(*) -> *, (*) -> *, M>| - public open override operator fun get(c: R|{foo/bar/Obj<{foo/bar/ArrowK=} kotlin/Function1<*, *>, A>=} io/github/kyay10/highkt/K, A>, A>|): R|{foo/bar/Component<{foo/bar/ArrowK=} kotlin/Function1<*, *>, {foo/bar/Compose=} io/github/kyay10/highkt/K, M>, M>, M, A>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, M>, M>, A>>, io/github/kyay10/highkt/K>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| A|, R|io/github/kyay10/highkt/K, A>, A>|>(R|/c|) + public open override operator fun get(c: R|(A) -> A|): R|(io/github/kyay10/highkt/K>) -> io/github/kyay10/highkt/K| { ^get context@fun (mma: R|io/github/kyay10/highkt/K>|): R|io/github/kyay10/highkt/K| { ^ (this@R|foo/bar/toNormalMonad|, R|/mma|).R|SubstitutionOverride|>||, R|A|>( = bind@fun (ma: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ R|/ma| } ) } - .R|io/github/kyay10/highkt/expandTo|, {foo/bar/Compose=} io/github/kyay10/highkt/K, M>, M>, M, A>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, M>, M>, A>>, io/github/kyay10/highkt/K>|>() + } } - .R|io/github/kyay10/highkt/expandTo|>=} io/github/kyay10/highkt/K, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>, M>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, {foo/bar/ArrowK=} kotlin/Function1<*, *>>, io/github/kyay10/highkt/K, {foo/bar/TypePair=} io/github/kyay10/highkt/K, M>, M>>>, M>|>() + } } diff --git a/compiler-plugin/testData/box/category.kt b/compiler-plugin/testData/box/category.kt index 069e130..ba47a4c 100644 --- a/compiler-plugin/testData/box/category.kt +++ b/compiler-plugin/testData/box/category.kt @@ -9,19 +9,19 @@ import kotlin.contracts.* typealias Obj = K2 interface Category { - fun K2.compose(g: K2): K2 + infix fun K2.compose(g: K2): K2 fun K2.source(): Obj fun K2.target(): Obj } context(category: Category) -infix fun K2.compose(g: K2) = with(category) { compose(g) } +infix fun K2.compose(g: K2) = with(category) { this@compose.compose(g) } context(category: Category) -fun K2.source() = with(category) { source() } +fun K2.source() = with(category) { this@source.source() } context(category: Category) -fun K2.target() = with(category) { target() } +fun K2.target() = with(category) { this@target.target() } @TypeFunction interface Opposite : K2 @@ -29,25 +29,21 @@ typealias Opp = K, Arr> context(c: Category) fun oppositeCategory(): Category> = object : Category> { - override fun K2, B, C>.compose(g: K2, A, B>): K2, A, C> = - g.compose(this) - - override fun K2, A, *>.source(): Obj, A> = target() - - override fun K2, *, A>.target(): Obj, A> = source() + override fun K2.compose(g: K2) = g compose this + override fun K2.source() = target() + override fun K2.target() = source() } typealias Arrow = (A) -> B typealias ArrowK = Arrow<*, *> -fun idArrow(): Arrow = { a: A -> a } +fun idArrow() = { a: A -> a } object ArrowCategory : Category { - override fun K2.compose(g: K2): K2 = - { a: A -> this(g(a)) }.expandTo() + override fun ((B) -> C).compose(g: (A) -> B) = { a: A -> this(g(a)) } - override fun K2.source(): Obj = idArrow() - override fun K2.target(): Obj = idArrow() + override fun Arrow.source() = idArrow() + override fun Arrow<*, A>.target() = idArrow() } @TypeFunction @@ -65,16 +61,17 @@ typealias TypePairSecond

= K> @TypeFunction interface MorphismProduct : K2, K2, TypePairFirst>, K2, TypePairSecond>> +typealias MorphismProducted = Pair, TypePairFirst>, K2, TypePairSecond>> typealias Product = K2, C1, C2> context(_: Category, _: Category) fun productCategory(): Category> = object : Category> { - override fun K2, PB, PC>.compose(g: K2, PA, PB>): K2, PA, PC> = + override fun MorphismProducted.compose(g: MorphismProducted) = first.compose(g.first) to second.compose(g.second) - override fun

K2, P, *>.source(): Obj, P> = first.source() to second.source() + override fun

MorphismProducted.source() = first.source() to second.source() - override fun

K2, *, P>.target(): Obj, P> = first.target() to second.target() + override fun

MorphismProducted.target() = first.target() to second.target() } interface Functor { @@ -85,9 +82,9 @@ interface Functor { context(c: Category) fun identityFunctor(): Functor = object : Functor { - override val firstCategory: Category = c - override val secondCategory: Category = c - override fun lift(f: K2): K2, K> = f.expandTo() + override val firstCategory = c + override val secondCategory = c + override fun lift(f: K2) = f } @TypeFunction @@ -96,13 +93,13 @@ typealias Compose = K2, F, G> context(f: Functor, g: Functor) fun composeFunctors(): Functor> = object : Functor> { - override val firstCategory: Category = g.firstCategory - override val secondCategory: Category = f.secondCategory - override fun lift(h: K2): K2, A>, K, B>> = lift(lift<_, _, G, _, _>(h)) + override val firstCategory = g.firstCategory + override val secondCategory = f.secondCategory + override fun lift(h: K2) = lift(g.lift(h)) } context(functor: Functor) -fun lift(f: K2): K2, K> = with(functor) { lift(f) } +fun lift(f: K2) = with(functor) { lift(f) } typealias BiFunctor = Functor, E, F> typealias EndoBiFunctor = BiFunctor @@ -116,7 +113,7 @@ interface Nat : K2, F, G> { } typealias NatK = K2, C, D> -fun Nat.at(h: K2): K2, K> = +fun Nat.at(h: K2) = context(firstFunctor, firstFunctor.firstCategory, firstFunctor.secondCategory) { get(h.target()) compose lift(h) } @@ -134,14 +131,14 @@ fun Iso( to: Nat, from: Nat, ): Iso = object : Iso, Nat by to { - override val inv: Iso = Iso(from, this) + override val inv = Iso(from, this) } private fun Iso( to: Nat, from: Iso, ): Iso = object : Iso, Nat by to { - override val inv: Iso = from + override val inv = from } typealias IsoK = K2, C, D> @@ -149,40 +146,39 @@ typealias IsoK = K2, C, D> context(functor: Functor) fun identityNat(): Iso { val nat = object : Nat { - override val firstFunctor: Functor = functor - override val secondFunctor: Functor = functor - override fun get(c: Obj): Component = lift(c) + override val firstFunctor = functor + override val secondFunctor = functor + override fun get(c: Obj) = lift(c) } return Iso(nat, nat) } infix fun Nat.horizontal(other: Nat): Nat, Compose> = object : Nat, Compose> { - override val firstFunctor: Functor> = + override val firstFunctor = context(this@horizontal.firstFunctor, other.firstFunctor) { composeFunctors() } - override val secondFunctor: Functor> = + override val secondFunctor = context(this@horizontal.secondFunctor, other.secondFunctor) { composeFunctors() } - override fun get(c: Obj): Component, Compose, A> = this@horizontal.at(other.at(c)) + override fun get(c: Obj) = this@horizontal.at(other.at(c)) } context(_: Category) infix fun Nat.vertical(other: Nat): Nat = object : Nat { - override val firstFunctor: Functor = other.firstFunctor - override val secondFunctor: Functor = this@vertical.secondFunctor - override fun get(c: Obj): Component = this@vertical[c] compose other[c] + override val firstFunctor = other.firstFunctor + override val secondFunctor = this@vertical.secondFunctor + override fun get(c: Obj) = this@vertical[c] compose other[c] } context(cd: Category) fun functorCategory(): Category> = object : Category> { - override fun K2, G, H>.compose(g: K2, F, G>): K2, F, H> = - context(cd) { // KT-81441 - this vertical g - } + override fun Nat.compose(g: Nat) = context(cd) { // KT-81441 + this vertical g + } - override fun K2, F, *>.source(): Obj, F> = context(firstFunctor) { identityNat() } - override fun K2, *, F>.target(): Obj, F> = context(secondFunctor) { identityNat() } + override fun Nat.source() = context(firstFunctor) { identityNat() } + override fun Nat.target() = context(secondFunctor) { identityNat() } } @TypeFunction @@ -191,14 +187,12 @@ interface FunctorCompose

: Compose, TypePairSecond

> context(_: Category, _: Category, _: Category) fun functorComposeFunctor(): Functor, NatK>, NatK, FunctorCompose<*>> = object : Functor, NatK>, NatK, FunctorCompose<*>> { - override val firstCategory: Category, NatK>> = - context(functorCategory(), functorCategory()) { - productCategory, NatK>() - } - override val secondCategory: Category> = functorCategory() + override val firstCategory = context(functorCategory(), functorCategory()) { + productCategory, NatK>() + } + override val secondCategory = functorCategory() - override fun lift(f: K2, NatK>, A, B>): K2, K, A>, K, B>> = - f.first horizontal f.second + override fun lift(f: MorphismProducted, NatK, A, B>) = f.first horizontal f.second } interface TensorProduct : Functor, Cat, F> { @@ -224,87 +218,75 @@ context(k: Category) fun endoFunctorComposeTensor(): TensorProduct, FunctorCompose<*>, Identity> = object : TensorProduct, FunctorCompose<*>, Identity>, Functor, EndoK>, EndoK, FunctorCompose<*>> by functorComposeFunctor() { - override val unitObject: Obj, Identity> = - context(identityFunctor()) { identityNat() } - - override fun leftUnitor(a: Obj, A>): K2, K, TypePair>, A> = - context(a.firstFunctor, identityFunctor()) { - object : Nat, A> { - override val firstFunctor: Functor> = composeFunctors<_, _, _, Identity, A>() - override val secondFunctor: Functor = a.firstFunctor - override fun get(c: Obj): Component, A, X> = - lift<_, _, A, _, _>(c) - }.expandTo() + override val unitObject = context(identityFunctor()) { identityNat() } + + override fun leftUnitor(a: Endo) = context(a.firstFunctor, identityFunctor()) { + object : Nat, A> { + override val firstFunctor = composeFunctors<_, _, _, Identity, A>() + override val secondFunctor = a.firstFunctor + override fun get(c: Obj) = lift<_, _, A, _, _>(c) } + } - override fun leftUnitorInv(a: Obj, A>): K2, A, K, TypePair>> = - context(a.firstFunctor, identityFunctor()) { - object : Nat> { - override val firstFunctor: Functor = a.firstFunctor - override val secondFunctor: Functor> = composeFunctors<_, _, _, Identity, A>() - override fun get(c: Obj): Component, X> = lift<_, _, A, _, _>(c) - }.expandTo() + override fun leftUnitorInv(a: Endo) = context(a.firstFunctor, identityFunctor()) { + object : Nat> { + override val firstFunctor = a.firstFunctor + override val secondFunctor = composeFunctors<_, _, _, Identity, A>() + override fun get(c: Obj) = lift<_, _, A, _, _>(c) } + } - override fun rightUnitor(a: Obj, A>): K2, K, TypePair>, A> = - context(a.firstFunctor, identityFunctor()) { - object : Nat, A> { - override val firstFunctor: Functor> = composeFunctors<_, _, _, A, Identity>() - override val secondFunctor: Functor = a.firstFunctor - override fun get(c: Obj): Component, A, X> = lift<_, _, A, _, _>(c) - }.expandTo() + override fun rightUnitor(a: Endo) = context(a.firstFunctor, identityFunctor()) { + object : Nat, A> { + override val firstFunctor = composeFunctors<_, _, _, A, Identity>() + override val secondFunctor = a.firstFunctor + override fun get(c: Obj) = lift<_, _, A, _, _>(c) } + } - override fun rightUnitorInv(a: Obj, A>): K2, A, K, TypePair>> = - context(a.firstFunctor, identityFunctor()) { - object : Nat> { - override val firstFunctor: Functor = a.firstFunctor - override val secondFunctor: Functor> = composeFunctors<_, _, _, A, Identity>() - override fun get(c: Obj): Component, X> = lift<_, _, A, _, _>(c) - }.expandTo() + override fun rightUnitorInv(a: Endo) = context(a.firstFunctor, identityFunctor()) { + object : Nat> { + override val firstFunctor = a.firstFunctor + override val secondFunctor = composeFunctors<_, _, _, A, Identity>() + override fun get(c: Obj) = lift<_, _, A, _, _>(c) } + } override fun associator( - a: Obj, A>, - b: Obj, B>, - c: Obj, C> - ): K2, K, TypePair, TypePair>, C>>, K, TypePair, TypePair>>>> = - context(a.firstFunctor, b.firstFunctor, c.firstFunctor) { - object : Nat, C>, Compose>> { - override val firstFunctor: Functor, C>> = - context(composeFunctors<_, _, _, A, B>()) { - composeFunctors<_, _, _, Compose, C>() - } - override val secondFunctor: Functor>> = - context(composeFunctors<_, _, _, B, C>()) { - composeFunctors<_, _, _, A, Compose>() - } - - override fun get(c: Obj): Component, C>, Compose>, X> = - lift<_, _, A, _, _>(lift<_, _, B, _, _>(lift<_, _, C, _, _>(c))) - }.expandTo() + a: Endo, + b: Endo, + c: Endo + ) = context(a.firstFunctor, b.firstFunctor, c.firstFunctor) { + object : Nat, C>, Compose>> { + override val firstFunctor: Functor, C>> = + context(composeFunctors<_, _, _, A, B>()) { + composeFunctors<_, _, _, Compose, C>() + } + override val secondFunctor: Functor>> = + context(composeFunctors<_, _, _, B, C>()) { + composeFunctors<_, _, _, A, Compose>() + } + + override fun get(c: Obj) = lift<_, _, A, _, _>(lift<_, _, B, _, _>(lift<_, _, C, _, _>(c))) } + } override fun associatorInv( - a: Obj, A>, - b: Obj, B>, - c: Obj, C> - ): K2, K, TypePair, TypePair>>>, K, TypePair, TypePair>, C>>> = - context(a.firstFunctor, b.firstFunctor, c.firstFunctor) { - object : Nat>, Compose, C>> { - override val firstFunctor: Functor>> = - context(composeFunctors<_, _, _, B, C>()) { - composeFunctors<_, _, _, A, Compose>() - } - override val secondFunctor: Functor, C>> = - context(composeFunctors<_, _, _, A, B>()) { - composeFunctors<_, _, _, Compose, C>() - } - - override fun get(c: Obj): Component>, Compose, C>, X> = - lift<_, _, A, _, _>(lift<_, _, B, _, _>(lift<_, _, C, _, _>(c))) - }.expandTo() + a: Endo, + b: Endo, + c: Endo + ) = context(a.firstFunctor, b.firstFunctor, c.firstFunctor) { + object : Nat>, Compose, C>> { + override val firstFunctor = context(composeFunctors<_, _, _, B, C>()) { + composeFunctors<_, _, _, A, Compose>() + } + override val secondFunctor = context(composeFunctors<_, _, _, A, B>()) { + composeFunctors<_, _, _, Compose, C>() + } + + override fun get(c: Obj) = lift<_, _, A, _, _>(lift<_, _, B, _, _>(lift<_, _, C, _, _>(c))) } + } } interface MonoidObject : TensorProduct { @@ -321,39 +303,33 @@ interface UsualMonad { } fun NormalMonad.toUsualMonad(): UsualMonad = object : UsualMonad { - override fun pure(a: A): K = empty().get(idArrow())(a) - override fun K.bind(f: (A) -> K): K = - context(plus().secondFunctor) { - val mapped = lift(f)(this) - plus().get(idArrow())(mapped) - } + override fun pure(a: A) = empty()[idArrow()](a) + override fun K.bind(f: (A) -> K) = context(plus().secondFunctor) { + val mapped = lift(f)(this) + plus()[idArrow()](mapped) + } } fun UsualMonad.toNormalFunctor(): Functor = object : Functor { - override val firstCategory: Category = ArrowCategory - override val secondCategory: Category = ArrowCategory - override fun lift(f: K2): K2, K> = - { it: K -> it.bind { pure(f(it)) } }.expandTo() + override val firstCategory = ArrowCategory + override val secondCategory = ArrowCategory + override fun lift(f: (A) -> B) = { ma: K -> ma.bind { pure(f(it)) } } } fun UsualMonad.toNormalMonad(): NormalMonad = context(toNormalFunctor(), ArrowCategory) { object : NormalMonad, TensorProduct, FunctorCompose<*>, Identity> by endoFunctorComposeTensor() { - override fun empty(): K2, Identity, M> = object : Nat { - override val firstFunctor: Functor = identityFunctor() - override val secondFunctor: Functor = contextOf>() - override fun get(c: Obj): Component = { a: A -> pure(a) }.expandTo() + override fun empty() = object : Nat { + override val firstFunctor = identityFunctor() + override val secondFunctor = contextOf>() + override fun get(c: (A) -> A) = { a: A -> pure(a) } } - override fun plus(): K2, K, TypePair>, M> = - object : Nat, M> { - override val firstFunctor: Functor> = - composeFunctors() - override val secondFunctor: Functor = contextOf>() - override fun get(c: Obj): Component, M, A> = { mma: K> -> - mma.bind { ma -> ma } - }.expandTo() - }.expandTo() + override fun plus() = object : Nat, M> { + override val firstFunctor = composeFunctors() + override val secondFunctor = contextOf>() + override fun get(c: (A) -> A) = { mma: K> -> mma.bind { ma -> ma } } + } } } diff --git a/compiler-plugin/testData/box/prompt.fir.ir.txt b/compiler-plugin/testData/box/prompt.fir.ir.txt new file mode 100644 index 0000000..3f29def --- /dev/null +++ b/compiler-plugin/testData/box/prompt.fir.ir.txt @@ -0,0 +1,251 @@ +FILE fqName:foo.bar fileName:/prompt.kt + CLASS CLASS name:Prompt modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.Prompt + TYPE_PARAMETER name:R index:0 variance: superTypes:[kotlin.Any?] reified:false + CONSTRUCTOR visibility:public returnType:foo.bar.Prompt [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Prompt modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + CLASS CLASS name:State modality:FINAL visibility:public [data] superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.State + TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:A index:1 variance:out superTypes:[kotlin.Any?] reified:false + PROPERTY name:run visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:run type:kotlin.coroutines.SuspendFunction1> visibility:private [final] + EXPRESSION_BODY + GET_VAR 'run: kotlin.coroutines.SuspendFunction1> declared in foo.bar.State.' type=kotlin.coroutines.SuspendFunction1> origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlin.coroutines.SuspendFunction1> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.State + correspondingProperty: PROPERTY name:run visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.coroutines.SuspendFunction1> declared in foo.bar.State' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:run type:kotlin.coroutines.SuspendFunction1> visibility:private [final]' type=kotlin.coroutines.SuspendFunction1> origin=null + receiver: GET_VAR ': foo.bar.State declared in foo.bar.State.' type=foo.bar.State origin=null + CONSTRUCTOR visibility:public returnType:foo.bar.State [primary] + VALUE_PARAMETER kind:Regular name:run index:0 type:kotlin.coroutines.SuspendFunction1> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:State modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' type=kotlin.Unit + FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL returnType:kotlin.coroutines.SuspendFunction1> [operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.State + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.coroutines.SuspendFunction1> declared in foo.bar.State' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:run type:kotlin.coroutines.SuspendFunction1> visibility:private [final]' type=kotlin.coroutines.SuspendFunction1> origin=null + receiver: GET_VAR ': foo.bar.State declared in foo.bar.State.component1' type=foo.bar.State origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL returnType:foo.bar.State + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.State + VALUE_PARAMETER kind:Regular name:run index:1 type:kotlin.coroutines.SuspendFunction1> + EXPRESSION_BODY + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:run type:kotlin.coroutines.SuspendFunction1> visibility:private [final]' type=kotlin.coroutines.SuspendFunction1> origin=null + receiver: GET_VAR ': foo.bar.State declared in foo.bar.State.copy' type=foo.bar.State origin=null + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun copy (run: kotlin.coroutines.SuspendFunction1>): foo.bar.State declared in foo.bar.State' + CONSTRUCTOR_CALL 'public constructor (run: kotlin.coroutines.SuspendFunction1>) declared in foo.bar.State' type=foo.bar.State origin=null + TYPE_ARG (of class) S: S of foo.bar.State + TYPE_ARG (of class) A: A of foo.bar.State + ARG run: GET_VAR 'run: kotlin.coroutines.SuspendFunction1> declared in foo.bar.State.copy' type=kotlin.coroutines.SuspendFunction1> origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.State + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + BLOCK_BODY + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ + ARG arg0: GET_VAR ': foo.bar.State declared in foo.bar.State.equals' type=foo.bar.State origin=null + ARG arg1: GET_VAR 'other: kotlin.Any? declared in foo.bar.State.equals' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.State' + CONST Boolean type=kotlin.Boolean value=true + WHEN type=kotlin.Unit origin=null + BRANCH + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=foo.bar.State + GET_VAR 'other: kotlin.Any? declared in foo.bar.State.equals' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.State' + CONST Boolean type=kotlin.Boolean value=false + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:foo.bar.State [val] + TYPE_OP type=foo.bar.State origin=IMPLICIT_CAST typeOperand=foo.bar.State + GET_VAR 'other: kotlin.Any? declared in foo.bar.State.equals' type=kotlin.Any? origin=null + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ + ARG : CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ + ARG arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:run type:kotlin.coroutines.SuspendFunction1> visibility:private [final]' type=kotlin.coroutines.SuspendFunction1> origin=null + receiver: GET_VAR ': foo.bar.State declared in foo.bar.State.equals' type=foo.bar.State origin=null + ARG arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:run type:kotlin.coroutines.SuspendFunction1> visibility:private [final]' type=kotlin.coroutines.SuspendFunction1> origin=null + receiver: GET_VAR 'val tmp_0: foo.bar.State declared in foo.bar.State.equals' type=foo.bar.State origin=null + then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.State' + CONST Boolean type=kotlin.Boolean value=false + RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in foo.bar.State' + CONST Boolean type=kotlin.Boolean value=true + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN returnType:kotlin.Int + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.State + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in foo.bar.State' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.coroutines.SuspendFunction1' type=kotlin.Int origin=null + ARG : GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:run type:kotlin.coroutines.SuspendFunction1> visibility:private [final]' type=kotlin.coroutines.SuspendFunction1> origin=null + receiver: GET_VAR ': foo.bar.State declared in foo.bar.State.hashCode' type=foo.bar.State origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN returnType:kotlin.String + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.State + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in foo.bar.State' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="State(" + CONST String type=kotlin.String value="run=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:run type:kotlin.coroutines.SuspendFunction1> visibility:private [final]' type=kotlin.coroutines.SuspendFunction1> origin=null + receiver: GET_VAR ': foo.bar.State declared in foo.bar.State.toString' type=foo.bar.State origin=null + CONST String type=kotlin.String value=")" + CLASS INTERFACE name:Monad modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.Monad + TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN name:flatMap visibility:public modality:ABSTRACT returnType:kotlin.Any? + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.Monad + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? + VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.coroutines.SuspendFunction1 + FUN name:pure visibility:public modality:ABSTRACT returnType:kotlin.Any? + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.Monad + VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.Monad.pure + FUN name:b visibility:public modality:FINAL returnType:B of foo.bar.b [suspend] + TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:A index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:2 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:Regular name:m index:0 type:foo.bar.Monad + VALUE_PARAMETER kind:Regular name:prompt index:1 type:foo.bar.Prompt + VALUE_PARAMETER kind:Regular name:a index:2 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun b (m: foo.bar.Monad, prompt: foo.bar.Prompt, a: kotlin.Any?): B of foo.bar.b declared in foo.bar' + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=B of foo.bar.b origin=null + TYPE_ARG A: foo.bar.Monad + TYPE_ARG B: foo.bar.Prompt + TYPE_ARG R: B of foo.bar.b + ARG a: GET_VAR 'm: foo.bar.Monad declared in foo.bar.b' type=foo.bar.Monad origin=null + ARG b: GET_VAR 'prompt: foo.bar.Prompt declared in foo.bar.b' type=foo.bar.Prompt origin=null + ARG block: FUN_EXPR type=kotlin.Function2, foo.bar.Prompt, B of foo.bar.b> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:B of foo.bar.b + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Monad index:0 type:foo.bar.Monad + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Prompt index:1 type:foo.bar.Prompt + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun ($context-Monad: foo.bar.Monad, $context-Prompt: foo.bar.Prompt): B of foo.bar.b declared in foo.bar.b' + CALL 'public final fun bind ($context-Prompt: foo.bar.Prompt, $context-Monad: foo.bar.Monad, : kotlin.Any?): B of foo.bar.bind declared in foo.bar' type=B of foo.bar.b origin=null + TYPE_ARG F: F of foo.bar.b + TYPE_ARG A: A of foo.bar.b + TYPE_ARG B: B of foo.bar.b + ARG $context-Prompt: GET_VAR '$context-Prompt: foo.bar.Prompt declared in foo.bar.b.' type=foo.bar.Prompt origin=null + ARG $context-Monad: GET_VAR '$context-Monad: foo.bar.Monad declared in foo.bar.b.' type=foo.bar.Monad origin=null + ARG : GET_VAR 'a: kotlin.Any? declared in foo.bar.b' type=kotlin.Any? origin=null + FUN name:b2 visibility:public modality:FINAL returnType:B of foo.bar.b2 [suspend] + TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:A index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:2 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:Context name:m index:0 type:foo.bar.Monad + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:foo.bar.Prompt + VALUE_PARAMETER kind:Regular name:a index:2 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun b2 (m: foo.bar.Monad, : foo.bar.Prompt, a: kotlin.Any?): B of foo.bar.b2 declared in foo.bar' + CALL 'public final fun b (m: foo.bar.Monad, prompt: foo.bar.Prompt, a: kotlin.Any?): B of foo.bar.b declared in foo.bar' type=B of foo.bar.b2 origin=null + TYPE_ARG F: kotlin.Any? + TYPE_ARG A: A of foo.bar.b2 + TYPE_ARG B: B of foo.bar.b2 + ARG m: GET_VAR 'm: foo.bar.Monad declared in foo.bar.b2' type=foo.bar.Monad origin=null + ARG prompt: GET_VAR ': foo.bar.Prompt declared in foo.bar.b2' type=foo.bar.Prompt origin=null + ARG a: GET_VAR 'a: kotlin.Any? declared in foo.bar.b2' type=kotlin.Any? origin=null + FUN name:b3 visibility:public modality:FINAL returnType:B of foo.bar.b3 [suspend] + TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:A index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:2 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:Context name:m index:0 type:foo.bar.Monad + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:foo.bar.Prompt> + VALUE_PARAMETER kind:Regular name:a index:2 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun b3 (m: foo.bar.Monad, : foo.bar.Prompt>, a: kotlin.Any?): B of foo.bar.b3 declared in foo.bar' + CALL 'public final fun b (m: foo.bar.Monad, prompt: foo.bar.Prompt, a: kotlin.Any?): B of foo.bar.b declared in foo.bar' type=B of foo.bar.b3 origin=null + TYPE_ARG F: kotlin.Any? + TYPE_ARG A: A of foo.bar.b3 + TYPE_ARG B: B of foo.bar.b3 + ARG m: GET_VAR 'm: foo.bar.Monad declared in foo.bar.b3' type=foo.bar.Monad origin=null + ARG prompt: GET_VAR ': foo.bar.Prompt> declared in foo.bar.b3' type=foo.bar.Prompt> origin=null + ARG a: GET_VAR 'a: kotlin.Any? declared in foo.bar.b3' type=kotlin.Any? origin=null + FUN name:bind visibility:public modality:FINAL returnType:B of foo.bar.bind [suspend] + TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:A index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:2 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Prompt index:0 type:foo.bar.Prompt + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Monad index:1 type:foo.bar.Monad + VALUE_PARAMETER kind:ExtensionReceiver name: index:2 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun bind ($context-Prompt: foo.bar.Prompt, $context-Monad: foo.bar.Monad, : kotlin.Any?): B of foo.bar.bind declared in foo.bar' + CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null + FUN name:box visibility:public modality:FINAL returnType:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in foo.bar' + CONST String type=kotlin.String value="OK" + FUN name:flatMap visibility:public modality:FINAL returnType:kotlin.Any? + TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:A index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:2 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:Context name:m index:0 type:foo.bar.Monad + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? + VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.coroutines.SuspendFunction1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun flatMap (m: foo.bar.Monad, : kotlin.Any?, f: kotlin.coroutines.SuspendFunction1): kotlin.Any? declared in foo.bar' + CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with declared in kotlin' type=kotlin.Any? origin=null + TYPE_ARG T: foo.bar.Monad + TYPE_ARG R: kotlin.Any? + ARG receiver: GET_VAR 'm: foo.bar.Monad declared in foo.bar.flatMap' type=foo.bar.Monad origin=null + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1, kotlin.Any?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:foo.bar.Monad + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun ($this$with: foo.bar.Monad): kotlin.Any? declared in foo.bar.flatMap' + CALL 'public abstract fun flatMap (: kotlin.Any?, f: kotlin.coroutines.SuspendFunction1): kotlin.Any? declared in foo.bar.Monad' type=kotlin.Any? origin=null + TYPE_ARG A: A of foo.bar.flatMap + TYPE_ARG B: B of foo.bar.flatMap + ARG (index:0): GET_VAR '$this$with: foo.bar.Monad declared in foo.bar.flatMap.' type=foo.bar.Monad origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.flatMap' type=kotlin.Any? origin=null + ARG f: GET_VAR 'f: kotlin.coroutines.SuspendFunction1 declared in foo.bar.flatMap' type=kotlin.coroutines.SuspendFunction1 origin=null + FUN name:pure visibility:public modality:FINAL returnType:kotlin.Any? + TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:A index:1 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:Context name:m index:0 type:foo.bar.Monad + VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.pure + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun pure (m: foo.bar.Monad, a: A of foo.bar.pure): kotlin.Any? declared in foo.bar' + CALL 'public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad' type=kotlin.Any? origin=null + TYPE_ARG A: A of foo.bar.pure + ARG : GET_VAR 'm: foo.bar.Monad declared in foo.bar.pure' type=foo.bar.Monad origin=null + ARG a: GET_VAR 'a: A of foo.bar.pure declared in foo.bar.pure' type=A of foo.bar.pure origin=null + TYPEALIAS name:StateOf visibility:public expandedType:kotlin.Any? + TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] reified:false diff --git a/compiler-plugin/testData/box/prompt.fir.txt b/compiler-plugin/testData/box/prompt.fir.txt new file mode 100644 index 0000000..dfa58e6 --- /dev/null +++ b/compiler-plugin/testData/box/prompt.fir.txt @@ -0,0 +1,61 @@ +FILE: prompt.kt + package foo.bar + + public final class Prompt : R|kotlin/Any| { + public constructor(): R|foo/bar/Prompt| { + super() + } + + } + public abstract interface Monad : R|kotlin/Any| { + public abstract fun pure(a: R|A|): R|io/github/kyay10/highkt/K| + + public abstract fun R|io/github/kyay10/highkt/K|.flatMap(f: R|suspend (A) -> io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| + + } + context(m: R|foo/bar/Monad|) + public final fun pure(a: R|A|): R|io/github/kyay10/highkt/K| { + ^pure R|/m|.R|SubstitutionOverride|>|(R|/a|) + } + context(m: R|foo/bar/Monad|) + public final fun R|io/github/kyay10/highkt/K|.flatMap(f: R|suspend (A) -> io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { + ^flatMap R|kotlin/with||, R|io/github/kyay10/highkt/K|>(R|/m|, = with@fun R|foo/bar/Monad|.(): R|io/github/kyay10/highkt/K| { + ^ (this@R|special/anonymous|, this@R|foo/bar/flatMap|).R|SubstitutionOverride|>|(R|/f|) + } + ) + } + context(: R|foo/bar/Prompt>|, : R|foo/bar/Monad|) + public final suspend fun R|io/github/kyay10/highkt/K|.bind(): R|B| { + ^bind R|kotlin/TODO|() + } + public final suspend fun b(m: R|foo/bar/Monad|, prompt: R|foo/bar/Prompt>|, a: R|io/github/kyay10/highkt/K|): R|B| { + ^b R|kotlin/context||, R|foo/bar/Prompt>|, R|B|>(R|/m|, R|/prompt|, = context(: R|foo/bar/Monad|, : R|foo/bar/Prompt>|) context@fun (): R|B| { + ^ context(R|/|, R|/|) R|/a|.R|foo/bar/bind|() + } + ) + } + public final data class State : R|kotlin/Any| { + public constructor(run: R|suspend (S) -> kotlin/Pair|): R|foo/bar/State| { + super() + } + + public final val run: R|suspend (S) -> kotlin/Pair| = R|/run| + public get(): R|suspend (S) -> kotlin/Pair| + + public final operator fun component1(): R|suspend (S) -> kotlin/Pair| + + public final fun copy(run: R|suspend (S) -> kotlin/Pair| = this@R|foo/bar/State|.R|foo/bar/State.run|): R|foo/bar/State| + + } + public final typealias StateOf = R|io/github/kyay10/highkt/K, S>| + context(m: R|foo/bar/Monad<{foo/bar/StateOf=} io/github/kyay10/highkt/K, S>>|) + public final suspend fun R|foo/bar/Prompt=} io/github/kyay10/highkt/K, S>, A>>|.b2(a: R|io/github/kyay10/highkt/K<{foo/bar/StateOf=} io/github/kyay10/highkt/K, S>, B>|): R|B| { + ^b2 R|foo/bar/b|=} io/github/kyay10/highkt/K, S>|, R|A|, R|B|>(R|/m|, this@R|foo/bar/b2|, R|/a|) + } + context(m: R|foo/bar/Monad<{foo/bar/StateOf=} io/github/kyay10/highkt/K, S>>|) + public final suspend fun R|foo/bar/Prompt>|.b3(a: R|io/github/kyay10/highkt/K<{foo/bar/StateOf=} io/github/kyay10/highkt/K, S>, B>|): R|B| { + ^b3 R|foo/bar/b|=} io/github/kyay10/highkt/K, S>|, R|A|, R|B|>(R|/m|, this@R|foo/bar/b3|, R|/a|) + } + public final fun box(): R|kotlin/String| { + ^box String(OK) + } diff --git a/compiler-plugin/testData/box/prompt.kt b/compiler-plugin/testData/box/prompt.kt new file mode 100644 index 0000000..f3fcca7 --- /dev/null +++ b/compiler-plugin/testData/box/prompt.kt @@ -0,0 +1,37 @@ +package foo.bar + +// LANGUAGE: +ContextParameters + +import io.github.kyay10.highkt.* + +class Prompt + +interface Monad { + fun pure(a: A): K + fun K.flatMap(f: suspend (A) -> K): K +} + +context(m: Monad) +fun pure(a: A): K = m.pure(a) + +context(m: Monad) +fun K.flatMap(f: suspend (A) -> K): K = with(m) { this@flatMap.flatMap(f) } + +context(_: Prompt>, _: Monad) +suspend fun K.bind(): B = TODO() +suspend fun b(m: Monad, prompt: Prompt>, a: K): B = context(m, prompt) { a.bind() } + +data class State(val run: suspend (S) -> Pair) +typealias StateOf = K, S> + +context(m: Monad>) +suspend fun Prompt, A>>.b2(a: K, B>): B = + b, A, B>(m, this, a) + +context(m: Monad>) +suspend fun Prompt>.b3(a: K, B>): B = + b, A, B>(m, this, a) + +fun box(): String { + return "OK" +} diff --git a/compiler-plugin/testData/box/simple.fir.ir.txt b/compiler-plugin/testData/box/simple.fir.ir.txt index 25ef726..9e8c9e9 100644 --- a/compiler-plugin/testData/box/simple.fir.ir.txt +++ b/compiler-plugin/testData/box/simple.fir.ir.txt @@ -2,11 +2,11 @@ FILE fqName:foo.bar fileName:/simple.kt PROPERTY name:maybeFunctor visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:maybeFunctor type:foo.bar.Functor visibility:private [final,static] EXPRESSION_BODY - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): Result of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null TYPE_ARG A: foo.bar.EitherBiFunctor TYPE_ARG B: foo.bar.ConstFunctor TYPE_ARG C: foo.bar.IdentityFunctor - TYPE_ARG Result: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor ARG a: GET_OBJECT 'CLASS OBJECT name:EitherBiFunctor modality:FINAL visibility:public superTypes:[foo.bar.BiFunctor>]' type=foo.bar.EitherBiFunctor ARG b: CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.ConstFunctor' type=foo.bar.ConstFunctor origin=null TYPE_ARG (of class) C: kotlin.Unit @@ -367,20 +367,12 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ConstFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Const - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ConstFunctor' - CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=foo.bar.Const origin=null TYPE_ARG (of class) C: C of foo.bar.ConstFunctor TYPE_ARG (of class) A: B of foo.bar.ConstFunctor.fmap ARG value: CALL 'public final fun (): C of foo.bar.Const declared in foo.bar.Const' type=C of foo.bar.ConstFunctor origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Const origin=IMPLICIT_CAST typeOperand=foo.bar.Const - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=foo.bar.Const origin=IMPLICIT_ARGUMENT CLASS CLASS name:Either modality:SEALED visibility:public superTypes:[kotlin.Any] sealedSubclasses: CLASS CLASS name:Left modality:FINAL visibility:public [data] superTypes:[foo.bar.Either] @@ -638,27 +630,16 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.PairFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Pair [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null VAR name:l type:L of foo.bar.PairFunctor [val] CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=L of foo.bar.PairFunctor origin=COMPONENT_N(index=1) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_5: kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_5: kotlin.Pair declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null VAR name:a type:A of foo.bar.PairFunctor.fmap [val] CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=A of foo.bar.PairFunctor.fmap origin=COMPONENT_N(index=2) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_5: kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_5: kotlin.Pair declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.PairFunctor' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: L of foo.bar.PairFunctor TYPE_ARG B: B of foo.bar.PairFunctor.fmap ARG : GET_VAR 'val l: L of foo.bar.PairFunctor declared in foo.bar.PairFunctor.fmap' type=L of foo.bar.PairFunctor origin=null @@ -787,16 +768,8 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Reader - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: B of foo.bar.ReaderMonad.bind ARG run: FUN_EXPR type=kotlin.Function1 origin=LAMBDA @@ -807,12 +780,10 @@ FILE fqName:foo.bar fileName:/simple.kt CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.ReaderMonad.bind origin=INVOKE ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=foo.bar.Reader origin=INVOKE - ARG : TYPE_OP type=kotlin.Function1> origin=IMPLICIT_CAST typeOperand=kotlin.Function1> - GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1 origin=null + ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1> origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=A of foo.bar.ReaderMonad.bind origin=INVOKE ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Reader origin=IMPLICIT_CAST typeOperand=foo.bar.Reader - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=foo.bar.Reader origin=IMPLICIT_ARGUMENT ARG p1: GET_VAR 'r: R of foo.bar.ReaderMonad declared in foo.bar.ReaderMonad.bind.' type=R of foo.bar.ReaderMonad origin=null ARG p1: GET_VAR 'r: R of foo.bar.ReaderMonad declared in foo.bar.ReaderMonad.bind.' type=R of foo.bar.ReaderMonad origin=null FUN name:fmap visibility:public modality:OPEN returnType:kotlin.Any? @@ -824,15 +795,8 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Reader - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: B of foo.bar.ReaderMonad.fmap ARG run: CALL 'public final fun compose (: kotlin.Function1, g: kotlin.Function1): kotlin.Function1 declared in foo.bar' type=kotlin.Function1 origin=null @@ -840,18 +804,17 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG B: A of foo.bar.ReaderMonad.fmap TYPE_ARG C: B of foo.bar.ReaderMonad.fmap ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Reader origin=IMPLICIT_CAST typeOperand=foo.bar.Reader - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=foo.bar.Reader origin=IMPLICIT_ARGUMENT ARG g: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.fmap' type=kotlin.Function1 origin=null - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:pure visibility:public modality:OPEN returnType:foo.bar.Reader TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.ReaderMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.ReaderMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ReaderMonad.pure): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ReaderMonad.pure): foo.bar.Reader declared in foo.bar.ReaderMonad' + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: A of foo.bar.ReaderMonad.pure ARG run: FUN_EXPR type=kotlin.Function1 origin=LAMBDA @@ -1085,18 +1048,6 @@ FILE fqName:foo.bar fileName:/simple.kt VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.Function1 VALUE_PARAMETER kind:Regular name:g index:3 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun rightMap (: kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: C of foo.bar.BiFunctor.bimap @@ -1119,12 +1070,6 @@ FILE fqName:foo.bar fileName:/simple.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun leftMap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.BiFunctor.leftMap @@ -1148,12 +1093,6 @@ FILE fqName:foo.bar fileName:/simple.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? VALUE_PARAMETER kind:Regular name:g index:2 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun rightMap (: kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.BiFunctor.rightMap @@ -1313,24 +1252,14 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Either - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.EitherBiFunctor' - BLOCK type=kotlin.Any? origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null - WHEN type=kotlin.Any? origin=WHEN + BLOCK type=foo.bar.Either origin=WHEN + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:foo.bar.Either [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null + WHEN type=foo.bar.Either origin=WHEN BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=foo.bar.Left - GET_VAR 'val tmp_9: kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null + GET_VAR 'val tmp_9: foo.bar.Either declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null then: CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Left) declared in foo.bar.Left' type=foo.bar.Left origin=null TYPE_ARG (of class) A: C of foo.bar.EitherBiFunctor.bimap TYPE_ARG (of class) B: D of foo.bar.EitherBiFunctor.bimap @@ -1338,10 +1267,10 @@ FILE fqName:foo.bar fileName:/simple.kt ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public final fun (): A of foo.bar.Left declared in foo.bar.Left' type=A of foo.bar.EitherBiFunctor.bimap origin=GET_PROPERTY ARG : TYPE_OP type=foo.bar.Left origin=IMPLICIT_CAST typeOperand=foo.bar.Left - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=IMPLICIT_ARGUMENT BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=foo.bar.Right - GET_VAR 'val tmp_9: kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null + GET_VAR 'val tmp_9: foo.bar.Either declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null then: CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right origin=null TYPE_ARG (of class) A: C of foo.bar.EitherBiFunctor.bimap TYPE_ARG (of class) B: D of foo.bar.EitherBiFunctor.bimap @@ -1349,7 +1278,7 @@ FILE fqName:foo.bar fileName:/simple.kt ARG : GET_VAR 'g: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public final fun (): B of foo.bar.Right declared in foo.bar.Right' type=B of foo.bar.EitherBiFunctor.bimap origin=GET_PROPERTY ARG : TYPE_OP type=foo.bar.Right origin=IMPLICIT_CAST typeOperand=foo.bar.Right - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=IMPLICIT_ARGUMENT BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public final fun noWhenBranchMatchedException (): kotlin.Nothing declared in kotlin.internal.ir' type=kotlin.Nothing origin=null @@ -1381,21 +1310,13 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Identity - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.IdentityFunctor' - CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null TYPE_ARG (of class) A: B of foo.bar.IdentityFunctor.fmap ARG value: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.IdentityFunctor.fmap origin=INVOKE ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public final fun (): A of foo.bar.Identity declared in foo.bar.Identity' type=A of foo.bar.IdentityFunctor.fmap origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Identity origin=IMPLICIT_CAST typeOperand=foo.bar.Identity - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=foo.bar.Identity origin=IMPLICIT_ARGUMENT CLASS OBJECT name:ListMonad modality:FINAL visibility:public superTypes:[foo.bar.Monad>] thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.ListMonad CONSTRUCTOR visibility:private returnType:foo.bar.ListMonad [primary] @@ -1432,31 +1353,21 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.collections.List - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ListMonad' - CALL 'public final fun flatMap (: kotlin.collections.Iterable, transform: kotlin.Function1>): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + CALL 'public final fun flatMap (: kotlin.collections.Iterable, transform: kotlin.Function1>): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: A of foo.bar.ListMonad.bind TYPE_ARG R: B of foo.bar.ListMonad.bind - ARG : TYPE_OP type=kotlin.collections.List origin=IMPLICIT_CAST typeOperand=kotlin.collections.List - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG transform: TYPE_OP type=kotlin.Function1> origin=IMPLICIT_CAST typeOperand=kotlin.Function1> - GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1 origin=null - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.collections.List origin=IMPLICIT_ARGUMENT + ARG transform: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1> origin=null + FUN name:pure visibility:public modality:OPEN returnType:kotlin.collections.List TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.ListMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.ListMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ListMonad.pure): kotlin.Any? declared in foo.bar.ListMonad' - CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ListMonad.pure): kotlin.collections.List declared in foo.bar.ListMonad' + CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: A of foo.bar.ListMonad.pure ARG element: GET_VAR 'a: A of foo.bar.ListMonad.pure declared in foo.bar.ListMonad.pure' type=A of foo.bar.ListMonad.pure origin=null CLASS OBJECT name:PairBiFunctor modality:FINAL visibility:public superTypes:[foo.bar.BiFunctor>] @@ -1508,30 +1419,16 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Pair [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null VAR name:a type:A of foo.bar.PairBiFunctor.bimap [val] CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=A of foo.bar.PairBiFunctor.bimap origin=COMPONENT_N(index=1) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_10: kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_10: kotlin.Pair declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null VAR name:b type:B of foo.bar.PairBiFunctor.bimap [val] CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=B of foo.bar.PairBiFunctor.bimap origin=COMPONENT_N(index=2) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_10: kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_10: kotlin.Pair declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.PairBiFunctor' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: C of foo.bar.PairBiFunctor.bimap TYPE_ARG B: D of foo.bar.PairBiFunctor.bimap ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=C of foo.bar.PairBiFunctor.bimap origin=INVOKE @@ -1576,28 +1473,20 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.UnitMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Const - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.UnitMonad.bind' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.UnitMonad' - CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=foo.bar.Const origin=null TYPE_ARG (of class) C: kotlin.Unit TYPE_ARG (of class) A: B of foo.bar.UnitMonad.bind ARG value: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:pure visibility:public modality:OPEN returnType:foo.bar.Const TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.UnitMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.UnitMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.UnitMonad.pure): kotlin.Any? declared in foo.bar.UnitMonad' - CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.UnitMonad.pure): foo.bar.Const declared in foo.bar.UnitMonad' + CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=foo.bar.Const origin=null TYPE_ARG (of class) C: kotlin.Unit TYPE_ARG (of class) A: A of foo.bar.UnitMonad.pure ARG value: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit @@ -1628,7 +1517,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG C: C of foo.bar.bimap TYPE_ARG D: D of foo.bar.bimap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.bimap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bimap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.bimap' type=kotlin.Function1 origin=null ARG g: GET_VAR 'g: kotlin.Function1 declared in foo.bar.bimap' type=kotlin.Function1 origin=null FUN name:bind visibility:public modality:FINAL returnType:kotlin.Any? @@ -1653,7 +1542,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG A: A of foo.bar.bind TYPE_ARG B: B of foo.bar.bind ARG (index:0): GET_VAR '$this$with: foo.bar.Monad declared in foo.bar.bind.' type=foo.bar.Monad origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bind' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.bind' type=kotlin.Function1 origin=null FUN name:box visibility:public modality:FINAL returnType:kotlin.String BLOCK_BODY @@ -1669,12 +1558,6 @@ FILE fqName:foo.bar fileName:/simple.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.Function1 VALUE_PARAMETER kind:Regular name:g index:1 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.compose' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': kotlin.Function1 declared in foo.bar.compose' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public final fun compose (: kotlin.Function1, g: kotlin.Function1): kotlin.Function1 declared in foo.bar' FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:C of foo.bar.compose @@ -1745,18 +1628,8 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap>, g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap>): kotlin.Any? declared in foo.bar.composeBiFunctors.' - CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=foo.bar.BiComposed.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null TYPE_ARG T: kotlin.Any? TYPE_ARG R: foo.bar.BiComposed.bimap, D of foo.bar.composeBiFunctors..bimap> ARG : CALL 'public final fun bimap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -1767,8 +1640,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG F: BF of foo.bar.composeBiFunctors ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors' type=foo.bar.BiFunctor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.BiComposed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> origin=IMPLICIT_CAST typeOperand=foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> origin=IMPLICIT_ARGUMENT ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -1836,26 +1708,19 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> declared in foo.bar.composeFunctors..fmap' type=kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Composed.fmap> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap>): kotlin.Any? declared in foo.bar.composeFunctors.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.Composed.fmap> origin=null TYPE_ARG A: foo.bar.Functor TYPE_ARG B: foo.bar.Functor - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: foo.bar.Composed.fmap> ARG a: GET_VAR 'ff: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null ARG b: GET_VAR 'gg: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null - ARG block: FUN_EXPR type=kotlin.Function2, foo.bar.Functor, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG block: FUN_EXPR type=kotlin.Function2, foo.bar.Functor, foo.bar.Composed.fmap>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Composed.fmap> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#1 index:0 type:foo.bar.Functor VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor, $context-Functor#2: foo.bar.Functor): kotlin.Any? declared in foo.bar.composeFunctors..fmap' + RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor, $context-Functor#2: foo.bar.Functor): foo.bar.Composed.fmap> declared in foo.bar.composeFunctors..fmap' CONSTRUCTOR_CALL 'public constructor (value: kotlin.Any?) declared in foo.bar.Composed' type=foo.bar.Composed.fmap> origin=null TYPE_ARG (of class) F: F of foo.bar.composeFunctors TYPE_ARG (of class) G: G of foo.bar.composeFunctors @@ -1866,8 +1731,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG B: kotlin.Any? ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor declared in foo.bar.composeFunctors..fmap.' type=foo.bar.Functor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.Composed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Composed.fmap> origin=IMPLICIT_CAST typeOperand=foo.bar.Composed.fmap> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=foo.bar.Composed.fmap> origin=IMPLICIT_ARGUMENT ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -1903,7 +1767,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG A: A of foo.bar.fmap TYPE_ARG B: B of foo.bar.fmap ARG (index:0): GET_VAR '$this$with: foo.bar.Functor declared in foo.bar.fmap.' type=foo.bar.Functor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.fmap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.fmap' type=kotlin.Function1 origin=null FUN name:horizontalLeft visibility:public modality:FINAL returnType:foo.bar.NT [infix] TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1942,12 +1806,8 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Composed.invoke> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalLeft.' - CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=foo.bar.Composed.invoke> origin=null TYPE_ARG T: kotlin.Any? TYPE_ARG R: foo.bar.Composed.invoke> ARG : CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null @@ -1959,8 +1819,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG B: kotlin.Any? ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.horizontalLeft' type=foo.bar.Functor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.Composed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Composed.invoke> origin=IMPLICIT_CAST typeOperand=foo.bar.Composed.invoke> - GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=kotlin.Any? origin=null + ARG : GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=foo.bar.Composed.invoke> origin=null ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -2012,12 +1871,8 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Composed.invoke> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalRight.' - CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=foo.bar.Composed.invoke> origin=null TYPE_ARG T: kotlin.Any? TYPE_ARG R: foo.bar.Composed.invoke> ARG : CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -2029,8 +1884,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG A: kotlin.Any? ARG : GET_VAR 'other: foo.bar.NT declared in foo.bar.horizontalRight' type=foo.bar.NT origin=VARIABLE_AS_FUNCTION ARG fa: CALL 'public final fun (): kotlin.Any? declared in foo.bar.Composed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Composed.invoke> origin=IMPLICIT_CAST typeOperand=foo.bar.Composed.invoke> - GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=kotlin.Any? origin=null + ARG : GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=foo.bar.Composed.invoke> origin=null ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -2080,15 +1934,8 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> declared in foo.bar.leftFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Swapped.fmap> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap>): kotlin.Any? declared in foo.bar.leftFunctor.' - CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=foo.bar.Swapped.fmap> origin=null TYPE_ARG T: kotlin.Any? TYPE_ARG R: foo.bar.Swapped.fmap> ARG : CALL 'public final fun leftMap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -2098,8 +1945,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG F: F of foo.bar.leftFunctor ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.leftFunctor' type=foo.bar.BiFunctor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.Swapped' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Swapped.fmap> origin=IMPLICIT_CAST typeOperand=foo.bar.Swapped.fmap> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=foo.bar.Swapped.fmap> origin=IMPLICIT_ARGUMENT ARG f: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> declared in foo.bar.leftFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> origin=null ARG block: FUNCTION_REFERENCE 'public constructor (value: kotlin.Any?) declared in foo.bar.Swapped' type=kotlin.reflect.KFunction1.fmap>> origin=null reflectionTarget= TYPE_ARG F: F of foo.bar.leftFunctor @@ -2130,7 +1976,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG B: B of foo.bar.leftMap TYPE_ARG C: C of foo.bar.leftMap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.leftMap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.leftMap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.leftMap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.leftMap' type=kotlin.Function1 origin=null FUN name:listExample visibility:private modality:FINAL returnType:kotlin.Unit BLOCK_BODY @@ -2149,7 +1995,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG A: kotlin.String TYPE_ARG B: kotlin.String ARG functor: GET_VAR '$context-ListMonad: foo.bar.ListMonad declared in foo.bar.listExample.' type=foo.bar.ListMonad origin=null - ARG : CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + ARG : CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: kotlin.String ARG elements: VARARG type=kotlin.Array varargElementType=kotlin.String CONST String type=kotlin.String value="Hello" @@ -2162,9 +2008,6 @@ FILE fqName:foo.bar fileName:/simple.kt STRING_CONCATENATION type=kotlin.String GET_VAR 'it: kotlin.String declared in foo.bar.listExample..' type=kotlin.String origin=null CONST String type=kotlin.String value="!" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val result: kotlin.collections.List declared in foo.bar.listExample.' type=kotlin.collections.List origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -2196,17 +2039,12 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG (of class) G: foo.bar.Identity<*> TYPE_ARG (of class) A: kotlin.Unit TYPE_ARG (of class) B: kotlin.Int - ARG value: CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right, foo.bar.Identity> origin=null - TYPE_ARG (of class) A: kotlin.Any? - TYPE_ARG (of class) B: foo.bar.Identity - ARG value: CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null - TYPE_ARG (of class) A: kotlin.Int - ARG value: CONST Int type=kotlin.Int value=10 - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val aMaybe: foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.Int> declared in foo.bar.maybeExample.' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.Int> origin=null + ARG value: CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right, foo.bar.Identity> origin=null + TYPE_ARG (of class) A: foo.bar.Const + TYPE_ARG (of class) B: foo.bar.Identity + ARG value: CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null + TYPE_ARG (of class) A: kotlin.Int + ARG value: CONST Int type=kotlin.Int value=10 VAR name:b type:foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> [val] CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> origin=null TYPE_ARG F: kotlin.Any? @@ -2221,9 +2059,6 @@ FILE fqName:foo.bar fileName:/simple.kt RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.String declared in foo.bar.maybeExample.' CALL 'public open fun toString (): kotlin.String declared in kotlin.Int' type=kotlin.String origin=null ARG : GET_VAR 'it: kotlin.Int declared in foo.bar.maybeExample..' type=kotlin.Int origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val b: foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> declared in foo.bar.maybeExample.' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> origin=null VAR name:expected type:foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> [val] CONSTRUCTOR_CALL 'public constructor (value: kotlin.Any?) declared in foo.bar.BiComposed' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> origin=null TYPE_ARG (of class) Bi: foo.bar.Either<*, *> @@ -2231,17 +2066,12 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG (of class) G: foo.bar.Identity<*> TYPE_ARG (of class) A: kotlin.Unit TYPE_ARG (of class) B: kotlin.String - ARG value: CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right, foo.bar.Identity> origin=null - TYPE_ARG (of class) A: kotlin.Any? - TYPE_ARG (of class) B: foo.bar.Identity - ARG value: CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null - TYPE_ARG (of class) A: kotlin.String - ARG value: CONST String type=kotlin.String value="10" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val expected: foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> declared in foo.bar.maybeExample.' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> origin=null + ARG value: CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right, foo.bar.Identity> origin=null + TYPE_ARG (of class) A: foo.bar.Const + TYPE_ARG (of class) B: foo.bar.Identity + ARG value: CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null + TYPE_ARG (of class) A: kotlin.String + ARG value: CONST String type=kotlin.String value="10" WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -2269,7 +2099,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG A: kotlin.String TYPE_ARG B: kotlin.String ARG functor: GET_VAR '$context-PairFunctor: foo.bar.PairFunctor declared in foo.bar.pairExample.' type=foo.bar.PairFunctor origin=null - ARG : CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + ARG : CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: kotlin.Int TYPE_ARG B: kotlin.String ARG : CONST Int type=kotlin.Int value=1 @@ -2282,9 +2112,6 @@ FILE fqName:foo.bar fileName:/simple.kt STRING_CONCATENATION type=kotlin.String GET_VAR 'it: kotlin.String declared in foo.bar.pairExample..' type=kotlin.String origin=null CONST String type=kotlin.String value="!" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val result: kotlin.Pair declared in foo.bar.pairExample.' type=kotlin.Pair origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -2353,9 +2180,6 @@ FILE fqName:foo.bar fileName:/simple.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap> declared in foo.bar.rightFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap> origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap>): kotlin.Any? declared in foo.bar.rightFunctor.' CALL 'public final fun rightMap (b: foo.bar.BiFunctor, : kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.rightFunctor @@ -2390,7 +2214,7 @@ FILE fqName:foo.bar fileName:/simple.kt TYPE_ARG B: B of foo.bar.rightMap TYPE_ARG D: D of foo.bar.rightMap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.rightMap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.rightMap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.rightMap' type=kotlin.Any? origin=null ARG g: GET_VAR 'g: kotlin.Function1 declared in foo.bar.rightMap' type=kotlin.Function1 origin=null FUN name:vertical visibility:public modality:FINAL returnType:foo.bar.NT [infix] TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false diff --git a/compiler-plugin/testData/box/simple.fir.txt b/compiler-plugin/testData/box/simple.fir.txt index ff36a35..4e8ca04 100644 --- a/compiler-plugin/testData/box/simple.fir.txt +++ b/compiler-plugin/testData/box/simple.fir.txt @@ -44,13 +44,11 @@ FILE: simple.kt super() } - public open override fun pure(a: R|A|): R|io/github/kyay10/highkt/K, A>| { + public open override fun pure(a: R|A|): R|kotlin/collections/List| { ^pure R|kotlin/collections/listOf|(R|/a|) } - public open override fun R|io/github/kyay10/highkt/K, A>|.bind(f: R|(A) -> io/github/kyay10/highkt/K, B>|): R|io/github/kyay10/highkt/K, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| kotlin/collections/List|, R|io/github/kyay10/highkt/K, A>, kotlin/collections/List>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, A>|>(this@R|foo/bar/ListMonad.bind|) + public open override fun R|kotlin/collections/List|.bind(f: R|(A) -> kotlin/collections/List|): R|kotlin/collections/List| { ^bind this@R|foo/bar/ListMonad.bind|.R|kotlin/collections/flatMap|(R|/f|) } @@ -60,18 +58,10 @@ FILE: simple.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, L, A>=} io/github/kyay10/highkt/K, L>, A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/K2, L, B>=} io/github/kyay10/highkt/K, L>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, L>, A>|>(this@R|foo/bar/PairFunctor.fmap|) - lval : R|{io/github/kyay10/highkt/K2, L, A>=} io/github/kyay10/highkt/K, L>, A>| = this@R|foo/bar/PairFunctor.fmap| + public open override fun R|kotlin/Pair|.fmap(f: R|(A) -> B|): R|kotlin/Pair| { + lval : R|kotlin/Pair| = this@R|foo/bar/PairFunctor.fmap| lval l: R|L| = R|/|.R|SubstitutionOverride|() - { - } - lval a: R|A| = R|/|.R|SubstitutionOverride|() - { - } - ^fmap R|/l|.R|kotlin/to|(R|/f|.R|SubstitutionOverride|(R|/a|)) } @@ -97,10 +87,8 @@ FILE: simple.kt super() } - public open override fun R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, F>, G>, A>|.fmap(f: R|(A) -> B|): R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, F>, G>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, F>, G>, A>|>(this@R|foo/bar/.fmap|) - ^fmap R|kotlin/context||, R|foo/bar/Functor|, R|io/github/kyay10/highkt/K, F>, G>, B>|>(R|/ff|, R|/gg|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|io/github/kyay10/highkt/K, F>, G>, B>| { + public open override fun R|foo/bar/Composed|.fmap(f: R|(A) -> B|): R|foo/bar/Composed| { + ^fmap R|kotlin/context||, R|foo/bar/Functor|, R|foo/bar/Composed|>(R|/ff|, R|/gg|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|foo/bar/Composed| { ^ R|foo/bar/Composed.Composed|(context(R|/|) this@R|foo/bar/.fmap|.R|SubstitutionOverride>|>|.R|foo/bar/fmap||, R|io/github/kyay10/highkt/K|>( = fmap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ context(R|/|) R|/it|.R|foo/bar/fmap|(R|/f|) } @@ -152,8 +140,6 @@ FILE: simple.kt } public final infix fun R|(A) -> B|.compose(g: R|(B) -> C|): R|(A) -> C| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(this@R|foo/bar/compose|) ^compose fun (a: R|A|): R|C| { ^ R|/g|.R|SubstitutionOverride|(this@R|foo/bar/compose|.R|SubstitutionOverride|(R|/a|)) } @@ -164,24 +150,20 @@ FILE: simple.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, R, A>=} io/github/kyay10/highkt/K, R>, A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/K2, R, B>=} io/github/kyay10/highkt/K, R>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, R>, A>|>(this@R|foo/bar/ReaderMonad.fmap|) + public open override fun R|foo/bar/Reader|.fmap(f: R|(A) -> B|): R|foo/bar/Reader| { ^fmap R|foo/bar/Reader.Reader|(this@R|foo/bar/ReaderMonad.fmap|.R|SubstitutionOverride A|>|.R|foo/bar/compose|(R|/f|)) } - public open override fun pure(a: R|A|): R|{io/github/kyay10/highkt/K2, R, A>=} io/github/kyay10/highkt/K, R>, A>| { + public open override fun pure(a: R|A|): R|foo/bar/Reader| { ^pure R|foo/bar/Reader.Reader|( = Reader@fun (: R|R|): R|A| { ^ R|/a| } ) } - public open override fun R|{io/github/kyay10/highkt/K2, R, A>=} io/github/kyay10/highkt/K, R>, A>|.bind(f: R|(A) -> {io/github/kyay10/highkt/K2, R, B>=} io/github/kyay10/highkt/K, R>, B>|): R|{io/github/kyay10/highkt/K2, R, B>=} io/github/kyay10/highkt/K, R>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| foo/bar/Reader|, R|io/github/kyay10/highkt/K, A>, foo/bar/Reader>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, R>, A>|>(this@R|foo/bar/ReaderMonad.bind|) + public open override fun R|foo/bar/Reader|.bind(f: R|(A) -> foo/bar/Reader|): R|foo/bar/Reader| { ^bind R|foo/bar/Reader.Reader|( = Reader@fun (r: R|R|): R|B| { - ^ R|/f|.R|kotlin/Function1.invoke|(this@R|foo/bar/ReaderMonad.bind|.R|SubstitutionOverride A|>|.R|SubstitutionOverride|(R|/r|)).R|SubstitutionOverride B|>|.R|SubstitutionOverride|(R|/r|) + ^ R|/f|.R|SubstitutionOverride|>|(this@R|foo/bar/ReaderMonad.bind|.R|SubstitutionOverride A|>|.R|SubstitutionOverride|(R|/r|)).R|SubstitutionOverride B|>|.R|SubstitutionOverride|(R|/r|) } ) } @@ -192,9 +174,7 @@ FILE: simple.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, C, A>=} io/github/kyay10/highkt/K, C>, A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/K2, C, B>=} io/github/kyay10/highkt/K, C>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, C>, A>|>(this@R|foo/bar/ConstFunctor.fmap|) + public open override fun R|foo/bar/Const|.fmap(f: R|(A) -> B|): R|foo/bar/Const| { ^fmap R|foo/bar/Const.Const|(this@R|foo/bar/ConstFunctor.fmap|.R|SubstitutionOverride|) } @@ -204,13 +184,11 @@ FILE: simple.kt super() } - public open override fun pure(a: R|A|): R|{io/github/kyay10/highkt/K2, kotlin/Unit, A>=} io/github/kyay10/highkt/K, kotlin/Unit>, A>| { + public open override fun pure(a: R|A|): R|foo/bar/Const| { ^pure R|foo/bar/Const.Const|(Q|kotlin/Unit|) } - public open override fun R|{io/github/kyay10/highkt/K2, kotlin/Unit, A>=} io/github/kyay10/highkt/K, kotlin/Unit>, A>|.bind(f: R|(A) -> {io/github/kyay10/highkt/K2, kotlin/Unit, B>=} io/github/kyay10/highkt/K, kotlin/Unit>, B>|): R|{io/github/kyay10/highkt/K2, kotlin/Unit, B>=} io/github/kyay10/highkt/K, kotlin/Unit>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| foo/bar/Const|, R|io/github/kyay10/highkt/K, A>, foo/bar/Const>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, kotlin/Unit>, A>|>(this@R|foo/bar/UnitMonad.bind|) + public open override fun R|foo/bar/Const|.bind(f: R|(A) -> foo/bar/Const|): R|foo/bar/Const| { ^bind R|foo/bar/Const.Const|(Q|kotlin/Unit|) } @@ -220,25 +198,17 @@ FILE: simple.kt super() } - public open override fun R|io/github/kyay10/highkt/K, A>|.fmap(f: R|(A) -> B|): R|io/github/kyay10/highkt/K, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, A>|>(this@R|foo/bar/IdentityFunctor.fmap|) + public open override fun R|foo/bar/Identity|.fmap(f: R|(A) -> B|): R|foo/bar/Identity| { ^fmap R|foo/bar/Identity.Identity|(R|/f|.R|SubstitutionOverride|(this@R|foo/bar/IdentityFunctor.fmap|.R|SubstitutionOverride|)) } } public abstract interface BiFunctor : R|kotlin/Any| { public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) ^bimap (this@R|foo/bar/BiFunctor|, (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.bimap|).R|foo/bar/BiFunctor.leftMap|(R|/f|)).R|foo/bar/BiFunctor.rightMap|(R|/g|) } public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.leftMap(f: R|(A) -> C|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) ^leftMap (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.leftMap|).R|foo/bar/BiFunctor.bimap|(R|/f|, = bimap@fun (it: R|B|): R|B| { ^ R|/it| } @@ -246,8 +216,6 @@ FILE: simple.kt } public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.rightMap(g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) ^rightMap (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.rightMap|).R|foo/bar/BiFunctor.bimap|(bimap@fun (it: R|A|): R|A| { ^ R|/it| } @@ -284,7 +252,6 @@ FILE: simple.kt } public open override fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.fmap(f: R|(B) -> C|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, C>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/f|) ^fmap context(R|/|) this@R|foo/bar/.fmap|.R|foo/bar/rightMap|(R|/f|) } @@ -312,9 +279,7 @@ FILE: simple.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/Swap=} io/github/kyay10/highkt/K, F>, A, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, F>, A>, B>|.fmap(f: R|(B) -> C|): R|{io/github/kyay10/highkt/K2<{foo/bar/Swap=} io/github/kyay10/highkt/K, F>, A, C>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, F>, A>, C>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, F>, A>, B>|>(this@R|foo/bar/.fmap|) + public open override fun R|foo/bar/Swapped|.fmap(f: R|(B) -> C|): R|foo/bar/Swapped| { ^fmap context(R|/|) this@R|foo/bar/.fmap|.R|SubstitutionOverride=} io/github/kyay10/highkt/K, A>|>|.R|foo/bar/leftMap|(R|/f|).R|kotlin/let|=} io/github/kyay10/highkt/K, A>|, R|foo/bar/Swapped|>(::R|foo/bar/Swapped.Swapped|) } @@ -358,11 +323,8 @@ FILE: simple.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, A, B>=} io/github/kyay10/highkt/K, A>, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2, C, D>=} io/github/kyay10/highkt/K, C>, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, A>, B>|>(this@R|foo/bar/EitherBiFunctor.bimap|) - ^bimap when (lval : R|{io/github/kyay10/highkt/K2, A, B>=} io/github/kyay10/highkt/K, A>, B>| = this@R|foo/bar/EitherBiFunctor.bimap|) { + public open override fun R|foo/bar/Either|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|foo/bar/Either| { + ^bimap when (lval : R|foo/bar/Either| = this@R|foo/bar/EitherBiFunctor.bimap|) { ($subj$ is R|foo/bar/Left|) -> { R|foo/bar/Left.Left|(R|/f|.R|SubstitutionOverride|(this@R|foo/bar/EitherBiFunctor.bimap|.R|SubstitutionOverride|)) } @@ -379,19 +341,10 @@ FILE: simple.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, A, B>=} io/github/kyay10/highkt/K, A>, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2, C, D>=} io/github/kyay10/highkt/K, C>, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, A>, B>|>(this@R|foo/bar/PairBiFunctor.bimap|) - lval : R|{io/github/kyay10/highkt/K2, A, B>=} io/github/kyay10/highkt/K, A>, B>| = this@R|foo/bar/PairBiFunctor.bimap| + public open override fun R|kotlin/Pair|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|kotlin/Pair| { + lval : R|kotlin/Pair| = this@R|foo/bar/PairBiFunctor.bimap| lval a: R|A| = R|/|.R|SubstitutionOverride|() - { - } - lval b: R|B| = R|/|.R|SubstitutionOverride|() - { - } - ^bimap R|/f|.R|SubstitutionOverride|(R|/a|).R|kotlin/to|(R|/g|.R|SubstitutionOverride|(R|/b|)) } @@ -417,10 +370,7 @@ FILE: simple.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, A, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, A>, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C, D>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C>, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, BF>, F>, G>, A>, B>|>(this@R|foo/bar/.bimap|) + public open override fun R|foo/bar/BiComposed|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|foo/bar/BiComposed| { ^bimap context(R|/|) this@R|foo/bar/.bimap|.R|SubstitutionOverride, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>|.R|foo/bar/bimap||, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|, R|BF|>(bimap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ context(R|/|) R|/it|.R|foo/bar/fmap|(R|/f|) } @@ -467,8 +417,7 @@ FILE: simple.kt super() } - public open override operator fun invoke(fa: R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, I>, F>, A>|): R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, J>, G>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, I>, F>, A>|>(R|/fa|) + public open override operator fun invoke(fa: R|foo/bar/Composed|): R|foo/bar/Composed| { ^invoke R|/other|.R|SubstitutionOverride|>||>(context(R|/|) R|/fa|.R|SubstitutionOverride>|>|.R|foo/bar/fmap||, R|io/github/kyay10/highkt/K|>( = fmap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ this@R|foo/bar/horizontalLeft|.R|SubstitutionOverride|>|(R|/it|) } @@ -485,8 +434,7 @@ FILE: simple.kt super() } - public open override operator fun invoke(fa: R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, I>, F>, A>|): R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, J>, G>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, I>, F>, A>|>(R|/fa|) + public open override operator fun invoke(fa: R|foo/bar/Composed|): R|foo/bar/Composed| { ^invoke context(R|/|) R|/other|.R|SubstitutionOverride|>||>(R|/fa|.R|SubstitutionOverride>|>|).R|foo/bar/fmap||, R|io/github/kyay10/highkt/K|>( = fmap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ this@R|foo/bar/horizontalRight|.R|SubstitutionOverride|>|(R|/it|) } @@ -502,7 +450,6 @@ FILE: simple.kt ^ (R|/it|, String(!)) } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/String>|>(R|/result|) when () { !=(R|/result|, R|kotlin/collections/listOf|(vararg(String(Hello!), String(World!)))) -> { R|kotlin/error|((R|/result|)) @@ -518,7 +465,6 @@ FILE: simple.kt ^ (R|/it|, String(!)) } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Int>, kotlin/String>|>(R|/result|) when () { !=(R|/result|, Int(1).R|kotlin/to|(String(Hello!))) -> { R|kotlin/error|((R|/result|)) @@ -530,15 +476,12 @@ FILE: simple.kt } private final fun maybeExample(): R|kotlin/Unit| { ^maybeExample R|kotlin/context|, io/github/kyay10/highkt/K, kotlin/Unit>, foo/bar/Identity<*>>, kotlin/Unit>>|, R|kotlin/Unit|>(R|foo/bar/maybeFunctor|, = context(: R|foo/bar/Functor<{foo/bar/MaybeK=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>, foo/bar/Identity<*>>, kotlin/Unit>>|) context@fun (): R|kotlin/Unit| { - lval aMaybe: R|{foo/bar/Maybe=} foo/bar/BiComposed, io/github/kyay10/highkt/K, kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/Int>| = R|foo/bar/BiComposed.BiComposed|(R|foo/bar/Right.Right|, kotlin/Unit, kotlin/Unit>=} io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit>|, R|foo/bar/Identity|>(R|foo/bar/Identity.Identity|(Int(10))).R|io/github/kyay10/highkt/expandTo|, io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit>, io/github/kyay10/highkt/K, kotlin/Int>>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit>>, io/github/kyay10/highkt/K, kotlin/Int>>|>()) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} foo/bar/BiComposed<*, *, *, *, *>, foo/bar/Either<*, *>>, io/github/kyay10/highkt/K, kotlin/Unit>>, foo/bar/Identity<*>>, kotlin/Unit>, kotlin/Int>|>(R|/aMaybe|) + lval aMaybe: R|{foo/bar/Maybe=} foo/bar/BiComposed, io/github/kyay10/highkt/K, kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/Int>| = R|foo/bar/BiComposed.BiComposed|(R|foo/bar/Right.Right|, kotlin/Unit>, kotlin/Unit> ~>} foo/bar/Const|, R|{io/github/kyay10/highkt/K, kotlin/Int> ~>} foo/bar/Identity|>(R|foo/bar/Identity.Identity|(Int(10)))) lval b: R|{foo/bar/Maybe=} foo/bar/BiComposed, io/github/kyay10/highkt/K, kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/String>| = context(R|/|) R|/aMaybe|.R|foo/bar/fmap|, io/github/kyay10/highkt/K, kotlin/Unit>, foo/bar/Identity<*>>, kotlin/Unit>|, R|kotlin/Int|, R|kotlin/String|>( = fmap@fun (it: R|kotlin/Int|): R|kotlin/String| { ^ R|/it|.R|kotlin/Int.toString|() } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} foo/bar/BiComposed<*, *, *, *, *>, foo/bar/Either<*, *>>, io/github/kyay10/highkt/K, kotlin/Unit>>, foo/bar/Identity<*>>, kotlin/Unit>, kotlin/String>|>(R|/b|) - lval expected: R|{foo/bar/Maybe=} foo/bar/BiComposed, io/github/kyay10/highkt/K, kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/String>| = R|foo/bar/BiComposed.BiComposed|(R|foo/bar/Right.Right|, kotlin/Unit, kotlin/Unit>=} io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit>|, R|foo/bar/Identity|>(R|foo/bar/Identity.Identity|(String(10))).R|io/github/kyay10/highkt/expandTo|, io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit>, io/github/kyay10/highkt/K, kotlin/String>>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit>>, io/github/kyay10/highkt/K, kotlin/String>>|>()) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} foo/bar/BiComposed<*, *, *, *, *>, foo/bar/Either<*, *>>, io/github/kyay10/highkt/K, kotlin/Unit>>, foo/bar/Identity<*>>, kotlin/Unit>, kotlin/String>|>(R|/expected|) + lval expected: R|{foo/bar/Maybe=} foo/bar/BiComposed, io/github/kyay10/highkt/K, kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/String>| = R|foo/bar/BiComposed.BiComposed|(R|foo/bar/Right.Right|, kotlin/Unit>, kotlin/Unit> ~>} foo/bar/Const|, R|{io/github/kyay10/highkt/K, kotlin/String> ~>} foo/bar/Identity|>(R|foo/bar/Identity.Identity|(String(10)))) when () { !=(R|/b|, R|/expected|) -> { R|kotlin/error|((R|/b|)) diff --git a/compiler-plugin/testData/box/simple.kt b/compiler-plugin/testData/box/simple.kt index 83324a7..86dce4e 100644 --- a/compiler-plugin/testData/box/simple.kt +++ b/compiler-plugin/testData/box/simple.kt @@ -17,22 +17,22 @@ interface Monad : Functor { } context(functor: Functor) -fun K.fmap(f: (A) -> B) = with(functor) { fmap(f) } +fun K.fmap(f: (A) -> B) = with(functor) { this@fmap.fmap(f) } context(monad: Monad) fun pure(a: A) = with(monad) { pure(a) } context(monad: Monad) -fun K.bind(f: (A) -> K) = with(monad) { bind(f) } +fun K.bind(f: (A) -> K) = with(monad) { this@bind.bind(f) } object ListMonad : Monad> { - override fun pure(a: A): K, A> = listOf(a) + override fun pure(a: A) = listOf(a) - override fun K, A>.bind(f: (A) -> K, B>): K, B> = flatMap(f) + override fun List.bind(f: (A) -> List) = flatMap(f) } class PairFunctor : Functor, L>> { - override fun K2, L, A>.fmap(f: (A) -> B): K2, L, B> { + override fun Pair.fmap(f: (A) -> B): Pair { val (l, a) = this return l to f(a) } @@ -43,7 +43,7 @@ typealias Compose = K2, F, G> context(ff: Functor, gg: Functor) fun composeFunctors() = object : Functor> { - override fun K, A>.fmap(f: (A) -> B): K, B> = context(ff, gg) { // KT-81441 + override fun Composed.fmap(f: (A) -> B): Composed = context(ff, gg) { // KT-81441 Composed(value.fmap { it.fmap(f) }) } } @@ -54,29 +54,27 @@ data class Const(val value: C) data class Identity(val value: A) -infix fun ((A) -> B).compose(g: (B) -> C): (A) -> C = { a: A -> g(this(a)) } +infix fun ((A) -> B).compose(g: (B) -> C) = { a: A -> g(this(a)) } class ReaderMonad : Monad, R>> { - override fun K2, R, A>.fmap(f: (A) -> B): K2, R, B> = Reader(run compose f) + override fun Reader.fmap(f: (A) -> B) = Reader(run compose f) - override fun pure(a: A): K2, R, A> = Reader { _: R -> a } - override fun K2, R, A>.bind(f: (A) -> K2, R, B>): K2, R, B> = - Reader { r: R -> f(run(r)).run(r) } + override fun pure(a: A) = Reader { _: R -> a } + override fun Reader.bind(f: (A) -> Reader) = Reader { r: R -> f(run(r)).run(r) } } class ConstFunctor : Functor, C>> { - override fun K2, C, A>.fmap(f: (A) -> B): K2, C, B> = Const<_, B>(value) + override fun Const.fmap(f: (A) -> B) = Const<_, B>(value) } object UnitMonad : Monad, Unit>> { - override fun pure(a: A): K2, Unit, A> = Const<_, A>(Unit) + override fun pure(a: A) = Const<_, A>(Unit) - override fun K2, Unit, A>.bind(f: (A) -> K2, Unit, B>): K2, Unit, B> = - Const<_, B>(Unit) + override fun Const.bind(f: (A) -> Const) = Const<_, B>(Unit) } object IdentityFunctor : Functor> { - override fun K, A>.fmap(f: (A) -> B): K, B> = Identity(f(value)) + override fun Identity.fmap(f: (A) -> B) = Identity(f(value)) } interface BiFunctor { @@ -86,17 +84,17 @@ interface BiFunctor { } context(b: BiFunctor) -fun K2.bimap(f: (A) -> C, g: (B) -> D) = with(b) { bimap(f, g) } +fun K2.bimap(f: (A) -> C, g: (B) -> D) = with(b) { this@bimap.bimap(f, g) } context(b: BiFunctor) -fun K2.leftMap(f: (A) -> C) = with(b) { leftMap(f) } +fun K2.leftMap(f: (A) -> C) = with(b) { this@leftMap.leftMap(f) } context(b: BiFunctor) -fun K2.rightMap(g: (B) -> D) = with(b) { rightMap(g) } +fun K2.rightMap(g: (B) -> D) = with(b) { this@rightMap.rightMap(g) } context(_: BiFunctor) fun rightFunctor() = object : Functor> { - override fun K2.fmap(f: (B) -> C): K2 = rightMap(f) + override fun K2.fmap(f: (B) -> C) = rightMap(f) } data class Swapped(val value: K2) : K2, B, A> @@ -104,7 +102,7 @@ typealias Swap = K, F> context(_: BiFunctor) fun leftFunctor() = object : Functor, A>> { - override fun K2, A, B>.fmap(f: (B) -> C): K2, A, C> = value.leftMap(f).let(::Swapped) + override fun Swapped.fmap(f: (B) -> C) = value.leftMap(f).let(::Swapped) } sealed class Either @@ -112,15 +110,14 @@ data class Left(val value: A) : Either() data class Right(val value: B) : Either() object EitherBiFunctor : BiFunctor> { - override fun K2, A, B>.bimap(f: (A) -> C, g: (B) -> D): K2, C, D> = - when (this) { - is Left -> Left(f(value)) - is Right -> Right(g(value)) - } + override fun Either.bimap(f: (A) -> C, g: (B) -> D): Either = when (this) { + is Left -> Left(f(value)) + is Right -> Right(g(value)) + } } object PairBiFunctor : BiFunctor> { - override fun K2, A, B>.bimap(f: (A) -> C, g: (B) -> D): K2, C, D> { + override fun Pair.bimap(f: (A) -> C, g: (B) -> D): Pair { val (a, b) = this return f(a) to g(b) } @@ -131,11 +128,10 @@ typealias BiCompose = K3, Bi, F, G> context(_: BiFunctor, _: Functor, _: Functor) fun composeBiFunctors() = object : BiFunctor> { - override fun K2, A, B>.bimap( + override fun BiComposed.bimap( f: (A) -> C, g: (B) -> D - ): K2, C, D> = - value.bimap({ it.fmap(f) }) { it.fmap(g) }.let(::BiComposed) + ) = value.bimap({ it.fmap(f) }) { it.fmap(g) }.let(::BiComposed) } typealias Maybe = BiComposed, K, Unit>, Identity<*>, Unit, A> @@ -152,19 +148,17 @@ interface NT { } infix fun NT.vertical(other: NT) = object : NT { - override fun invoke(fa: K): K = other(this@vertical(fa)) + override fun invoke(fa: K) = other(this@vertical(fa)) } context(_: Functor) infix fun NT.horizontalLeft(other: NT) = object : NT, Compose> { - override fun invoke(fa: K, A>): K, A> = - other(fa.value.fmap { this@horizontalLeft(it) }).let(::Composed) + override fun invoke(fa: Composed) = other(fa.value.fmap { this@horizontalLeft(it) }).let(::Composed) } context(_: Functor) infix fun NT.horizontalRight(other: NT) = object : NT, Compose> { - override fun invoke(fa: K, A>): K, A> = - other(fa.value).fmap { this@horizontalRight(it) }.let(::Composed) + override fun invoke(fa: Composed) = other(fa.value).fmap { this@horizontalRight(it) }.let(::Composed) } // ---------------------------------------------------------------- @@ -180,9 +174,9 @@ private fun pairExample() = context(PairFunctor()) { } private fun maybeExample() = context(maybeFunctor) { - val aMaybe = Maybe(Right, Unit, Unit>, _>(Identity(10)).expandTo()) + val aMaybe = Maybe(Right(Identity(10))) val b: Maybe = aMaybe.fmap { it.toString() } - val expected: Maybe = Maybe(Right, Unit, Unit>, _>(Identity("10")).expandTo()) + val expected: Maybe = Maybe(Right(Identity("10"))) if (b != expected) error("$b") } diff --git a/compiler-plugin/testData/box/simple2.fir.ir.txt b/compiler-plugin/testData/box/simple2.fir.ir.txt index 80a7812..507ed57 100644 --- a/compiler-plugin/testData/box/simple2.fir.ir.txt +++ b/compiler-plugin/testData/box/simple2.fir.ir.txt @@ -124,18 +124,6 @@ FILE fqName:foo.bar fileName:/simple2.kt VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.Function1 VALUE_PARAMETER kind:Regular name:g index:3 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun rightMap (: kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: C of foo.bar.BiFunctor.bimap @@ -158,12 +146,6 @@ FILE fqName:foo.bar fileName:/simple2.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun leftMap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.BiFunctor.leftMap @@ -187,12 +169,6 @@ FILE fqName:foo.bar fileName:/simple2.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? VALUE_PARAMETER kind:Regular name:g index:2 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun rightMap (: kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.BiFunctor.rightMap @@ -257,7 +233,7 @@ FILE fqName:foo.bar fileName:/simple2.kt TYPE_ARG C: C of foo.bar.bimap TYPE_ARG D: D of foo.bar.bimap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.bimap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bimap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.bimap' type=kotlin.Function1 origin=null ARG g: GET_VAR 'g: kotlin.Function1 declared in foo.bar.bimap' type=kotlin.Function1 origin=null FUN name:box visibility:public modality:FINAL returnType:kotlin.String @@ -323,18 +299,8 @@ FILE fqName:foo.bar fileName:/simple2.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap>, g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap>): kotlin.Any? declared in foo.bar.composeBiFunctors.' - CONSTRUCTOR_CALL 'public constructor (value: kotlin.Any?) declared in foo.bar.BiComposed' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (value: kotlin.Any?) declared in foo.bar.BiComposed' type=foo.bar.BiComposed.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null TYPE_ARG (of class) Bi: BF of foo.bar.composeBiFunctors TYPE_ARG (of class) F: F of foo.bar.composeBiFunctors TYPE_ARG (of class) G: G of foo.bar.composeBiFunctors @@ -348,8 +314,7 @@ FILE fqName:foo.bar fileName:/simple2.kt TYPE_ARG F: BF of foo.bar.composeBiFunctors ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors' type=foo.bar.BiFunctor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.BiComposed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> origin=IMPLICIT_CAST typeOperand=foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> origin=IMPLICIT_ARGUMENT ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -397,7 +362,7 @@ FILE fqName:foo.bar fileName:/simple2.kt TYPE_ARG A: A of foo.bar.fmap TYPE_ARG B: B of foo.bar.fmap ARG (index:0): GET_VAR '$this$with: foo.bar.Functor declared in foo.bar.fmap.' type=foo.bar.Functor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.fmap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.fmap' type=kotlin.Function1 origin=null TYPEALIAS name:BiCompose visibility:public expandedType:kotlin.Any? TYPE_PARAMETER name:Bi index:0 variance: superTypes:[kotlin.Any?] reified:false diff --git a/compiler-plugin/testData/box/simple2.fir.txt b/compiler-plugin/testData/box/simple2.fir.txt index 131b9ea..c091d99 100644 --- a/compiler-plugin/testData/box/simple2.fir.txt +++ b/compiler-plugin/testData/box/simple2.fir.txt @@ -14,16 +14,10 @@ FILE: simple2.kt } public abstract interface BiFunctor : R|kotlin/Any| { public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) ^bimap (this@R|foo/bar/BiFunctor|, (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.bimap|).R|foo/bar/BiFunctor.leftMap|(R|/f|)).R|foo/bar/BiFunctor.rightMap|(R|/g|) } public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.leftMap(f: R|(A) -> C|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) ^leftMap (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.leftMap|).R|foo/bar/BiFunctor.bimap|(R|/f|, = bimap@fun (it: R|B|): R|B| { ^ R|/it| } @@ -31,8 +25,6 @@ FILE: simple2.kt } public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.rightMap(g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) ^rightMap (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.rightMap|).R|foo/bar/BiFunctor.bimap|(bimap@fun (it: R|A|): R|A| { ^ R|/it| } @@ -68,10 +60,7 @@ FILE: simple2.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, A, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, A>, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C, D>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C>, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, BF>, F>, G>, A>, B>|>(this@R|foo/bar/.bimap|) + public open override fun R|foo/bar/BiComposed|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|foo/bar/BiComposed| { ^bimap R|foo/bar/BiComposed.BiComposed|(context(R|/|) this@R|foo/bar/.bimap|.R|SubstitutionOverride, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>|.R|foo/bar/bimap||, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|, R|BF|>(bimap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ context(R|/|) R|/it|.R|foo/bar/fmap|(R|/f|) } diff --git a/compiler-plugin/testData/box/simple2.kt b/compiler-plugin/testData/box/simple2.kt index 4ceafc6..537dcdd 100644 --- a/compiler-plugin/testData/box/simple2.kt +++ b/compiler-plugin/testData/box/simple2.kt @@ -9,7 +9,7 @@ interface Functor { } context(functor: Functor) -fun K.fmap(f: (A) -> B) = with(functor) { fmap(f) } +fun K.fmap(f: (A) -> B) = with(functor) { this@fmap.fmap(f) } interface BiFunctor { fun K2.bimap(f: (A) -> C, g: (B) -> D): K2 = leftMap(f).rightMap(g) @@ -18,18 +18,17 @@ interface BiFunctor { } context(b: BiFunctor) -fun K2.bimap(f: (A) -> C, g: (B) -> D) = with(b) { bimap(f, g) } +fun K2.bimap(f: (A) -> C, g: (B) -> D) = with(b) { this@bimap.bimap(f, g) } data class BiComposed(val value: K2, K>) typealias BiCompose = K3, Bi, F, G> context(_: BiFunctor, _: Functor, _: Functor) fun composeBiFunctors() = object : BiFunctor> { - override fun K2, A, B>.bimap( + override fun BiComposed.bimap( f: (A) -> C, g: (B) -> D - ): K2, C, D> = - BiComposed(value.bimap({ it.fmap(f) }) { it.fmap(g) }) + ) = BiComposed(value.bimap({ it.fmap(f) }) { it.fmap(g) }) } fun box(): String { diff --git a/compiler-plugin/testData/box/type_functions.fir.ir.txt b/compiler-plugin/testData/box/type_functions.fir.ir.txt index 381b694..8a7afe9 100644 --- a/compiler-plugin/testData/box/type_functions.fir.ir.txt +++ b/compiler-plugin/testData/box/type_functions.fir.ir.txt @@ -2,11 +2,11 @@ FILE fqName:foo.bar fileName:/type_functions.kt PROPERTY name:maybeFunctor visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:maybeFunctor type:foo.bar.Functor visibility:private [final,static] EXPRESSION_BODY - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): Result of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null TYPE_ARG A: foo.bar.EitherBiFunctor TYPE_ARG B: foo.bar.ConstFunctor TYPE_ARG C: foo.bar.IdentityFunctor - TYPE_ARG Result: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor ARG a: GET_OBJECT 'CLASS OBJECT name:EitherBiFunctor modality:FINAL visibility:public superTypes:[foo.bar.BiFunctor>]' type=foo.bar.EitherBiFunctor ARG b: CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.ConstFunctor' type=foo.bar.ConstFunctor origin=null TYPE_ARG (of class) C: kotlin.Unit @@ -45,11 +45,11 @@ FILE fqName:foo.bar fileName:/type_functions.kt PROPERTY name:maybeFunctor2 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:maybeFunctor2 type:foo.bar.Functor visibility:private [final,static] EXPRESSION_BODY - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): Result of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null TYPE_ARG A: foo.bar.EitherBiFunctor TYPE_ARG B: foo.bar.ConstFunctor TYPE_ARG C: foo.bar.IdentityFunctor - TYPE_ARG Result: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor ARG a: GET_OBJECT 'CLASS OBJECT name:EitherBiFunctor modality:FINAL visibility:public superTypes:[foo.bar.BiFunctor>]' type=foo.bar.EitherBiFunctor ARG b: CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.ConstFunctor' type=foo.bar.ConstFunctor origin=null TYPE_ARG (of class) C: kotlin.Unit @@ -114,17 +114,8 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ConstFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: C of foo.bar.ConstFunctor - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ConstFunctor' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : TYPE_OP type={C of foo.bar.ConstFunctor & Any} origin=IMPLICIT_CAST typeOperand={C of foo.bar.ConstFunctor & Any} - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=C of foo.bar.ConstFunctor origin=null CLASS CLASS name:Either modality:SEALED visibility:public superTypes:[kotlin.Any] sealedSubclasses: CLASS CLASS name:Left modality:FINAL visibility:public [data] superTypes:[foo.bar.Either] @@ -282,27 +273,16 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.PairFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Pair [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null VAR name:l type:L of foo.bar.PairFunctor [val] CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=L of foo.bar.PairFunctor origin=COMPONENT_N(index=1) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_1: kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_1: kotlin.Pair declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null VAR name:a type:A of foo.bar.PairFunctor.fmap [val] CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=A of foo.bar.PairFunctor.fmap origin=COMPONENT_N(index=2) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_1: kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_1: kotlin.Pair declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.PairFunctor' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: L of foo.bar.PairFunctor TYPE_ARG B: B of foo.bar.PairFunctor.fmap ARG : GET_VAR 'val l: L of foo.bar.PairFunctor declared in foo.bar.PairFunctor.fmap' type=L of foo.bar.PairFunctor origin=null @@ -431,16 +411,8 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Reader - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: B of foo.bar.ReaderMonad.bind ARG run: FUN_EXPR type=kotlin.Function1 origin=LAMBDA @@ -451,12 +423,10 @@ FILE fqName:foo.bar fileName:/type_functions.kt CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.ReaderMonad.bind origin=INVOKE ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=foo.bar.Reader origin=INVOKE - ARG : TYPE_OP type=kotlin.Function1> origin=IMPLICIT_CAST typeOperand=kotlin.Function1> - GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1 origin=null + ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1> origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=A of foo.bar.ReaderMonad.bind origin=INVOKE ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Reader origin=IMPLICIT_CAST typeOperand=foo.bar.Reader - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=foo.bar.Reader origin=IMPLICIT_ARGUMENT ARG p1: GET_VAR 'r: R of foo.bar.ReaderMonad declared in foo.bar.ReaderMonad.bind.' type=R of foo.bar.ReaderMonad origin=null ARG p1: GET_VAR 'r: R of foo.bar.ReaderMonad declared in foo.bar.ReaderMonad.bind.' type=R of foo.bar.ReaderMonad origin=null FUN name:fmap visibility:public modality:OPEN returnType:kotlin.Any? @@ -468,15 +438,8 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Reader - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: B of foo.bar.ReaderMonad.fmap ARG run: CALL 'public final fun compose (: kotlin.Function1, g: kotlin.Function1): kotlin.Function1 declared in foo.bar' type=kotlin.Function1 origin=null @@ -484,18 +447,17 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG B: A of foo.bar.ReaderMonad.fmap TYPE_ARG C: B of foo.bar.ReaderMonad.fmap ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Reader origin=IMPLICIT_CAST typeOperand=foo.bar.Reader - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=foo.bar.Reader origin=IMPLICIT_ARGUMENT ARG g: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.fmap' type=kotlin.Function1 origin=null - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:pure visibility:public modality:OPEN returnType:foo.bar.Reader TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.ReaderMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.ReaderMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ReaderMonad.pure): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ReaderMonad.pure): foo.bar.Reader declared in foo.bar.ReaderMonad' + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: A of foo.bar.ReaderMonad.pure ARG run: FUN_EXPR type=kotlin.Function1 origin=LAMBDA @@ -677,24 +639,6 @@ FILE fqName:foo.bar fileName:/type_functions.kt VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.Function1 VALUE_PARAMETER kind:Regular name:g index:3 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun rightMap (: kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: C of foo.bar.BiFunctor.bimap @@ -717,15 +661,6 @@ FILE fqName:foo.bar fileName:/type_functions.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun leftMap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.BiFunctor.leftMap @@ -749,15 +684,6 @@ FILE fqName:foo.bar fileName:/type_functions.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? VALUE_PARAMETER kind:Regular name:g index:2 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun rightMap (: kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.BiFunctor.rightMap @@ -976,24 +902,14 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Either - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.EitherBiFunctor' - BLOCK type=kotlin.Any? origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null - WHEN type=kotlin.Any? origin=WHEN + BLOCK type=foo.bar.Either origin=WHEN + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:foo.bar.Either [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null + WHEN type=foo.bar.Either origin=WHEN BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=foo.bar.Left - GET_VAR 'val tmp_4: kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null + GET_VAR 'val tmp_4: foo.bar.Either declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null then: CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Left) declared in foo.bar.Left' type=foo.bar.Left origin=null TYPE_ARG (of class) A: C of foo.bar.EitherBiFunctor.bimap TYPE_ARG (of class) B: D of foo.bar.EitherBiFunctor.bimap @@ -1001,10 +917,10 @@ FILE fqName:foo.bar fileName:/type_functions.kt ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public final fun (): A of foo.bar.Left declared in foo.bar.Left' type=A of foo.bar.EitherBiFunctor.bimap origin=GET_PROPERTY ARG : TYPE_OP type=foo.bar.Left origin=IMPLICIT_CAST typeOperand=foo.bar.Left - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=IMPLICIT_ARGUMENT BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=foo.bar.Right - GET_VAR 'val tmp_4: kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null + GET_VAR 'val tmp_4: foo.bar.Either declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null then: CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right origin=null TYPE_ARG (of class) A: C of foo.bar.EitherBiFunctor.bimap TYPE_ARG (of class) B: D of foo.bar.EitherBiFunctor.bimap @@ -1012,7 +928,7 @@ FILE fqName:foo.bar fileName:/type_functions.kt ARG : GET_VAR 'g: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public final fun (): B of foo.bar.Right declared in foo.bar.Right' type=B of foo.bar.EitherBiFunctor.bimap origin=GET_PROPERTY ARG : TYPE_OP type=foo.bar.Right origin=IMPLICIT_CAST typeOperand=foo.bar.Right - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=IMPLICIT_ARGUMENT BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public final fun noWhenBranchMatchedException (): kotlin.Nothing declared in kotlin.internal.ir' type=kotlin.Nothing origin=null @@ -1044,17 +960,10 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: A of foo.bar.IdentityFunctor.fmap - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.IdentityFunctor' - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.Any? origin=INVOKE + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.IdentityFunctor.fmap origin=INVOKE ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION - ARG p1: TYPE_OP type={A of foo.bar.IdentityFunctor.fmap & Any} origin=IMPLICIT_CAST typeOperand={A of foo.bar.IdentityFunctor.fmap & Any} - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Any? origin=null + ARG p1: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=A of foo.bar.IdentityFunctor.fmap origin=null CLASS OBJECT name:ListMonad modality:FINAL visibility:public superTypes:[foo.bar.Monad>] thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.ListMonad CONSTRUCTOR visibility:private returnType:foo.bar.ListMonad [primary] @@ -1091,31 +1000,21 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.collections.List - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ListMonad' - CALL 'public final fun flatMap (: kotlin.collections.Iterable, transform: kotlin.Function1>): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + CALL 'public final fun flatMap (: kotlin.collections.Iterable, transform: kotlin.Function1>): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: A of foo.bar.ListMonad.bind TYPE_ARG R: B of foo.bar.ListMonad.bind - ARG : TYPE_OP type=kotlin.collections.List origin=IMPLICIT_CAST typeOperand=kotlin.collections.List - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG transform: TYPE_OP type=kotlin.Function1> origin=IMPLICIT_CAST typeOperand=kotlin.Function1> - GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1 origin=null - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.collections.List origin=IMPLICIT_ARGUMENT + ARG transform: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1> origin=null + FUN name:pure visibility:public modality:OPEN returnType:kotlin.collections.List TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.ListMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.ListMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ListMonad.pure): kotlin.Any? declared in foo.bar.ListMonad' - CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ListMonad.pure): kotlin.collections.List declared in foo.bar.ListMonad' + CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: A of foo.bar.ListMonad.pure ARG element: GET_VAR 'a: A of foo.bar.ListMonad.pure declared in foo.bar.ListMonad.pure' type=A of foo.bar.ListMonad.pure origin=null CLASS OBJECT name:PairBiFunctor modality:FINAL visibility:public superTypes:[foo.bar.BiFunctor>] @@ -1167,30 +1066,16 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Pair [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null VAR name:a type:A of foo.bar.PairBiFunctor.bimap [val] CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=A of foo.bar.PairBiFunctor.bimap origin=COMPONENT_N(index=1) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_5: kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_5: kotlin.Pair declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null VAR name:b type:B of foo.bar.PairBiFunctor.bimap [val] CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=B of foo.bar.PairBiFunctor.bimap origin=COMPONENT_N(index=2) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_5: kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_5: kotlin.Pair declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.PairBiFunctor' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: C of foo.bar.PairBiFunctor.bimap TYPE_ARG B: D of foo.bar.PairBiFunctor.bimap ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=C of foo.bar.PairBiFunctor.bimap origin=INVOKE @@ -1235,29 +1120,13 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1 - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.UnitMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Unit - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.UnitMonad.bind' type=kotlin.Any? origin=null - RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.UnitMonad' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : TYPE_OP type=kotlin.Unit origin=IMPLICIT_CAST typeOperand=kotlin.Unit - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.UnitMonad.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:pure visibility:public modality:OPEN returnType:kotlin.Unit TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.UnitMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.UnitMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.UnitMonad.pure): kotlin.Any? declared in foo.bar.UnitMonad' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit FUN name:bimap visibility:public modality:FINAL returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false @@ -1285,7 +1154,7 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG C: C of foo.bar.bimap TYPE_ARG D: D of foo.bar.bimap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.bimap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bimap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.bimap' type=kotlin.Function1 origin=null ARG g: GET_VAR 'g: kotlin.Function1 declared in foo.bar.bimap' type=kotlin.Function1 origin=null FUN name:bind visibility:public modality:FINAL returnType:kotlin.Any? @@ -1310,7 +1179,7 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG A: A of foo.bar.bind TYPE_ARG B: B of foo.bar.bind ARG (index:0): GET_VAR '$this$with: foo.bar.Monad declared in foo.bar.bind.' type=foo.bar.Monad origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bind' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.bind' type=kotlin.Function1 origin=null FUN name:box visibility:public modality:FINAL returnType:kotlin.String BLOCK_BODY @@ -1327,12 +1196,6 @@ FILE fqName:foo.bar fileName:/type_functions.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.Function1 VALUE_PARAMETER kind:Regular name:g index:1 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.compose' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': kotlin.Function1 declared in foo.bar.compose' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public final fun compose (: kotlin.Function1, g: kotlin.Function1): kotlin.Function1 declared in foo.bar' FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:C of foo.bar.compose @@ -1403,59 +1266,48 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap>, g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap>): kotlin.Any? declared in foo.bar.composeBiFunctors.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null - TYPE_ARG T: foo.bar.BiFunctor - TYPE_ARG R: kotlin.Any? - ARG with: GET_VAR 'bf: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors' type=foo.bar.BiFunctor origin=null - ARG block: FUN_EXPR type=kotlin.Function1, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-BiFunctor index:0 type:foo.bar.BiFunctor - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-BiFunctor: foo.bar.BiFunctor): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' - CALL 'public final fun bimap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG A: kotlin.Any? - TYPE_ARG B: kotlin.Any? - TYPE_ARG C: kotlin.Any? - TYPE_ARG D: kotlin.Any? - TYPE_ARG F: BF of foo.bar.composeBiFunctors - ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors..bimap.' type=foo.bar.BiFunctor origin=null - ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap.' - CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG F: F of foo.bar.composeBiFunctors - TYPE_ARG A: A of foo.bar.composeBiFunctors..bimap - TYPE_ARG B: C of foo.bar.composeBiFunctors..bimap - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor declared in foo.bar.composeBiFunctors' type=foo.bar.Functor origin=null - ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeBiFunctors..bimap..' type=kotlin.Any? origin=null - ARG f: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> origin=null - ARG g: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap.' - CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG F: G of foo.bar.composeBiFunctors - TYPE_ARG A: B of foo.bar.composeBiFunctors..bimap - TYPE_ARG B: D of foo.bar.composeBiFunctors..bimap - ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor declared in foo.bar.composeBiFunctors' type=foo.bar.Functor origin=null - ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeBiFunctors..bimap..' type=kotlin.Any? origin=null - ARG f: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + TYPE_ARG T: foo.bar.BiFunctor + TYPE_ARG R: kotlin.Any? + ARG with: GET_VAR 'bf: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors' type=foo.bar.BiFunctor origin=null + ARG block: FUN_EXPR type=kotlin.Function1, kotlin.Any?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-BiFunctor index:0 type:foo.bar.BiFunctor + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun ($context-BiFunctor: foo.bar.BiFunctor): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' + CALL 'public final fun bimap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG A: kotlin.Any? + TYPE_ARG B: kotlin.Any? + TYPE_ARG C: kotlin.Any? + TYPE_ARG D: kotlin.Any? + TYPE_ARG F: BF of foo.bar.composeBiFunctors + ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors..bimap.' type=foo.bar.BiFunctor origin=null + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=null + ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap.' + CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG F: F of foo.bar.composeBiFunctors + TYPE_ARG A: A of foo.bar.composeBiFunctors..bimap + TYPE_ARG B: C of foo.bar.composeBiFunctors..bimap + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor declared in foo.bar.composeBiFunctors' type=foo.bar.Functor origin=null + ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeBiFunctors..bimap..' type=kotlin.Any? origin=null + ARG f: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> origin=null + ARG g: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap.' + CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG F: G of foo.bar.composeBiFunctors + TYPE_ARG A: B of foo.bar.composeBiFunctors..bimap + TYPE_ARG B: D of foo.bar.composeBiFunctors..bimap + ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor declared in foo.bar.composeBiFunctors' type=foo.bar.Functor origin=null + ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeBiFunctors..bimap..' type=kotlin.Any? origin=null + ARG f: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.composeBiFunctors.' type=foo.bar.composeBiFunctors. origin=OBJECT_LITERAL FUN name:composeBiFunctors2 visibility:public modality:FINAL returnType:foo.bar.BiFunctor TYPE_PARAMETER name:BF index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1516,59 +1368,48 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors2..bimap> declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors2..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors2..bimap> declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors2..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors2..bimap>, g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors2..bimap>): kotlin.Any? declared in foo.bar.composeBiFunctors2.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null - TYPE_ARG T: foo.bar.BiFunctor - TYPE_ARG R: kotlin.Any? - ARG with: GET_VAR 'bf: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors2' type=foo.bar.BiFunctor origin=null - ARG block: FUN_EXPR type=kotlin.Function1, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-BiFunctor index:0 type:foo.bar.BiFunctor - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-BiFunctor: foo.bar.BiFunctor): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap' - CALL 'public final fun bimap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG A: kotlin.Any? - TYPE_ARG B: kotlin.Any? - TYPE_ARG C: kotlin.Any? - TYPE_ARG D: kotlin.Any? - TYPE_ARG F: BF of foo.bar.composeBiFunctors2 - ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors2..bimap.' type=foo.bar.BiFunctor origin=null - ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap.' - CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG F: F of foo.bar.composeBiFunctors2 - TYPE_ARG A: A of foo.bar.composeBiFunctors2..bimap - TYPE_ARG B: C of foo.bar.composeBiFunctors2..bimap - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor declared in foo.bar.composeBiFunctors2' type=foo.bar.Functor origin=null - ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap..' type=kotlin.Any? origin=null - ARG f: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors2..bimap> declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors2..bimap> origin=null - ARG g: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap.' - CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG F: G of foo.bar.composeBiFunctors2 - TYPE_ARG A: B of foo.bar.composeBiFunctors2..bimap - TYPE_ARG B: D of foo.bar.composeBiFunctors2..bimap - ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor declared in foo.bar.composeBiFunctors2' type=foo.bar.Functor origin=null - ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap..' type=kotlin.Any? origin=null - ARG f: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors2..bimap> declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors2..bimap> origin=null + CALL 'public final fun context (with: T of kotlin.context, block: @[ContextFunctionTypeParams(count = 1)] kotlin.Function1): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + TYPE_ARG T: foo.bar.BiFunctor + TYPE_ARG R: kotlin.Any? + ARG with: GET_VAR 'bf: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors2' type=foo.bar.BiFunctor origin=null + ARG block: FUN_EXPR type=kotlin.Function1, kotlin.Any?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-BiFunctor index:0 type:foo.bar.BiFunctor + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun ($context-BiFunctor: foo.bar.BiFunctor): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap' + CALL 'public final fun bimap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG A: kotlin.Any? + TYPE_ARG B: kotlin.Any? + TYPE_ARG C: kotlin.Any? + TYPE_ARG D: kotlin.Any? + TYPE_ARG F: BF of foo.bar.composeBiFunctors2 + ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors2..bimap.' type=foo.bar.BiFunctor origin=null + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Any? origin=null + ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap.' + CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG F: F of foo.bar.composeBiFunctors2 + TYPE_ARG A: A of foo.bar.composeBiFunctors2..bimap + TYPE_ARG B: C of foo.bar.composeBiFunctors2..bimap + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor declared in foo.bar.composeBiFunctors2' type=foo.bar.Functor origin=null + ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap..' type=kotlin.Any? origin=null + ARG f: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors2..bimap> declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors2..bimap> origin=null + ARG g: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap.' + CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG F: G of foo.bar.composeBiFunctors2 + TYPE_ARG A: B of foo.bar.composeBiFunctors2..bimap + TYPE_ARG B: D of foo.bar.composeBiFunctors2..bimap + ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor declared in foo.bar.composeBiFunctors2' type=foo.bar.Functor origin=null + ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeBiFunctors2..bimap..' type=kotlin.Any? origin=null + ARG f: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors2..bimap> declared in foo.bar.composeBiFunctors2..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors2..bimap> origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.composeBiFunctors2.' type=foo.bar.composeBiFunctors2. origin=OBJECT_LITERAL FUN name:composeFunctors visibility:public modality:FINAL returnType:foo.bar.Functor TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1606,17 +1447,11 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> declared in foo.bar.composeFunctors..fmap' type=kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap>): kotlin.Any? declared in foo.bar.composeFunctors.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=kotlin.Any? origin=null TYPE_ARG A: foo.bar.Functor TYPE_ARG B: foo.bar.Functor - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: kotlin.Any? ARG a: GET_VAR 'ff: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null ARG b: GET_VAR 'gg: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null ARG block: FUN_EXPR type=kotlin.Function2, foo.bar.Functor, kotlin.Any?> origin=LAMBDA @@ -1625,26 +1460,24 @@ FILE fqName:foo.bar fileName:/type_functions.kt VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor, $context-Functor#2: foo.bar.Functor): kotlin.Any? declared in foo.bar.composeFunctors..fmap' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG F: F of foo.bar.composeFunctors - TYPE_ARG A: kotlin.Any? - TYPE_ARG B: kotlin.Any? - ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor declared in foo.bar.composeFunctors..fmap.' type=foo.bar.Functor origin=null - ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeFunctors..fmap.' - CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG F: G of foo.bar.composeFunctors - TYPE_ARG A: A of foo.bar.composeFunctors..fmap - TYPE_ARG B: B of foo.bar.composeFunctors..fmap - ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor declared in foo.bar.composeFunctors..fmap.' type=foo.bar.Functor origin=null - ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeFunctors..fmap..' type=kotlin.Any? origin=null - ARG f: GET_VAR 'f: kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> declared in foo.bar.composeFunctors..fmap' type=kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> origin=null + CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG F: F of foo.bar.composeFunctors + TYPE_ARG A: kotlin.Any? + TYPE_ARG B: kotlin.Any? + ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor declared in foo.bar.composeFunctors..fmap.' type=foo.bar.Functor origin=null + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=kotlin.Any? origin=null + ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.composeFunctors..fmap.' + CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG F: G of foo.bar.composeFunctors + TYPE_ARG A: A of foo.bar.composeFunctors..fmap + TYPE_ARG B: B of foo.bar.composeFunctors..fmap + ARG functor: GET_VAR '$context-Functor#2: foo.bar.Functor declared in foo.bar.composeFunctors..fmap.' type=foo.bar.Functor origin=null + ARG : GET_VAR 'it: kotlin.Any? declared in foo.bar.composeFunctors..fmap..' type=kotlin.Any? origin=null + ARG f: GET_VAR 'f: kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> declared in foo.bar.composeFunctors..fmap' type=kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.composeFunctors.' type=foo.bar.composeFunctors. origin=OBJECT_LITERAL FUN name:fmap visibility:public modality:FINAL returnType:kotlin.Any? TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1668,7 +1501,7 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG A: A of foo.bar.fmap TYPE_ARG B: B of foo.bar.fmap ARG (index:0): GET_VAR '$this$with: foo.bar.Functor declared in foo.bar.fmap.' type=foo.bar.Functor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.fmap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.fmap' type=kotlin.Function1 origin=null FUN name:horizontalLeft visibility:public modality:FINAL returnType:foo.bar.NT [infix] TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1707,30 +1540,25 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalLeft.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null + CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null + TYPE_ARG A: kotlin.Any? + ARG : GET_VAR 'other: foo.bar.NT declared in foo.bar.horizontalLeft' type=foo.bar.NT origin=VARIABLE_AS_FUNCTION + ARG fa: CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG F: I of foo.bar.horizontalLeft TYPE_ARG A: kotlin.Any? - ARG : GET_VAR 'other: foo.bar.NT declared in foo.bar.horizontalLeft' type=foo.bar.NT origin=VARIABLE_AS_FUNCTION - ARG fa: CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG F: I of foo.bar.horizontalLeft - TYPE_ARG A: kotlin.Any? - TYPE_ARG B: kotlin.Any? - ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.horizontalLeft' type=foo.bar.Functor origin=null - ARG : GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=kotlin.Any? origin=null - ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalLeft..invoke' - CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null - TYPE_ARG A: A of foo.bar.horizontalLeft..invoke - ARG : GET_VAR ': foo.bar.NT declared in foo.bar.horizontalLeft' type=foo.bar.NT origin=null - ARG fa: GET_VAR 'it: kotlin.Any? declared in foo.bar.horizontalLeft..invoke.' type=kotlin.Any? origin=null + TYPE_ARG B: kotlin.Any? + ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.horizontalLeft' type=foo.bar.Functor origin=null + ARG : GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=kotlin.Any? origin=null + ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalLeft..invoke' + CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null + TYPE_ARG A: A of foo.bar.horizontalLeft..invoke + ARG : GET_VAR ': foo.bar.NT declared in foo.bar.horizontalLeft' type=foo.bar.NT origin=null + ARG fa: GET_VAR 'it: kotlin.Any? declared in foo.bar.horizontalLeft..invoke.' type=kotlin.Any? origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.horizontalLeft.' type=foo.bar.horizontalLeft. origin=OBJECT_LITERAL FUN name:horizontalRight visibility:public modality:FINAL returnType:foo.bar.NT [infix] TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1769,30 +1597,25 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalRight.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG F: J of foo.bar.horizontalRight + CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG F: J of foo.bar.horizontalRight + TYPE_ARG A: kotlin.Any? + TYPE_ARG B: kotlin.Any? + ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.horizontalRight' type=foo.bar.Functor origin=null + ARG : CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null TYPE_ARG A: kotlin.Any? - TYPE_ARG B: kotlin.Any? - ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.horizontalRight' type=foo.bar.Functor origin=null - ARG : CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null - TYPE_ARG A: kotlin.Any? - ARG : GET_VAR 'other: foo.bar.NT declared in foo.bar.horizontalRight' type=foo.bar.NT origin=VARIABLE_AS_FUNCTION - ARG fa: GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=kotlin.Any? origin=null - ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalRight..invoke' - CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null - TYPE_ARG A: A of foo.bar.horizontalRight..invoke - ARG : GET_VAR ': foo.bar.NT declared in foo.bar.horizontalRight' type=foo.bar.NT origin=null - ARG fa: GET_VAR 'it: kotlin.Any? declared in foo.bar.horizontalRight..invoke.' type=kotlin.Any? origin=null + ARG : GET_VAR 'other: foo.bar.NT declared in foo.bar.horizontalRight' type=foo.bar.NT origin=VARIABLE_AS_FUNCTION + ARG fa: GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=kotlin.Any? origin=null + ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalRight..invoke' + CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null + TYPE_ARG A: A of foo.bar.horizontalRight..invoke + ARG : GET_VAR ': foo.bar.NT declared in foo.bar.horizontalRight' type=foo.bar.NT origin=null + ARG fa: GET_VAR 'it: kotlin.Any? declared in foo.bar.horizontalRight..invoke.' type=kotlin.Any? origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.horizontalRight.' type=foo.bar.horizontalRight. origin=OBJECT_LITERAL FUN name:leftFunctor visibility:public modality:FINAL returnType:foo.bar.Functor TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1829,23 +1652,15 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> declared in foo.bar.leftFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap>): kotlin.Any? declared in foo.bar.leftFunctor.' - CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CALL 'public final fun leftMap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null - TYPE_ARG A: B of foo.bar.leftFunctor..fmap - TYPE_ARG B: A of foo.bar.leftFunctor - TYPE_ARG C: C of foo.bar.leftFunctor..fmap - TYPE_ARG F: F of foo.bar.leftFunctor - ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.leftFunctor' type=foo.bar.BiFunctor origin=null - ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG f: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> declared in foo.bar.leftFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> origin=null + CALL 'public final fun leftMap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null + TYPE_ARG A: B of foo.bar.leftFunctor..fmap + TYPE_ARG B: A of foo.bar.leftFunctor + TYPE_ARG C: C of foo.bar.leftFunctor..fmap + TYPE_ARG F: F of foo.bar.leftFunctor + ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.leftFunctor' type=foo.bar.BiFunctor origin=null + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG f: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> declared in foo.bar.leftFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> origin=null CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.leftFunctor.' type=foo.bar.leftFunctor. origin=OBJECT_LITERAL FUN name:leftMap visibility:public modality:FINAL returnType:kotlin.Any? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1871,7 +1686,7 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG B: B of foo.bar.leftMap TYPE_ARG C: C of foo.bar.leftMap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.leftMap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.leftMap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.leftMap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.leftMap' type=kotlin.Function1 origin=null FUN name:listExample visibility:private modality:FINAL returnType:kotlin.Unit BLOCK_BODY @@ -1890,7 +1705,7 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG A: kotlin.String TYPE_ARG B: kotlin.String ARG functor: GET_VAR '$context-ListMonad: foo.bar.ListMonad declared in foo.bar.listExample.' type=foo.bar.ListMonad origin=null - ARG : CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + ARG : CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: kotlin.String ARG elements: VARARG type=kotlin.Array varargElementType=kotlin.String CONST String type=kotlin.String value="Hello" @@ -1903,9 +1718,6 @@ FILE fqName:foo.bar fileName:/type_functions.kt STRING_CONCATENATION type=kotlin.String GET_VAR 'it: kotlin.String declared in foo.bar.listExample..' type=kotlin.String origin=null CONST String type=kotlin.String value="!" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val result: kotlin.collections.List declared in foo.bar.listExample.' type=kotlin.collections.List origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -1930,41 +1742,43 @@ FILE fqName:foo.bar fileName:/type_functions.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor index:0 type:foo.bar.Functor BLOCK_BODY - VAR name:a type:foo.bar.Either [val] + VAR name:a type:kotlin.Any? [val] CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right origin=null TYPE_ARG (of class) A: kotlin.Unit TYPE_ARG (of class) B: kotlin.Int ARG value: CONST Int type=kotlin.Int value=10 - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val a: foo.bar.Either declared in foo.bar.maybeExample.' type=foo.bar.Either origin=null VAR name:b type:foo.bar.Either [val] CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=foo.bar.Either origin=null TYPE_ARG F: kotlin.Any? - TYPE_ARG A: kotlin.Int + TYPE_ARG A: kotlin.String TYPE_ARG B: kotlin.String ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.maybeExample.' type=foo.bar.Functor origin=null - ARG : CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : GET_VAR 'val a: foo.bar.Either declared in foo.bar.maybeExample.' type=foo.bar.Either origin=null - ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + ARG : CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=foo.bar.Either origin=null + TYPE_ARG F: kotlin.Any? + TYPE_ARG A: kotlin.Int + TYPE_ARG B: kotlin.String + ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.maybeExample.' type=foo.bar.Functor origin=null + ARG : GET_VAR 'val a: kotlin.Any? declared in foo.bar.maybeExample.' type=kotlin.Any? origin=null + ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.String declared in foo.bar.maybeExample.' + CALL 'public open fun toString (): kotlin.String declared in kotlin.Int' type=kotlin.String origin=null + ARG : GET_VAR 'it: kotlin.Int declared in foo.bar.maybeExample..' type=kotlin.Int origin=null + ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String - VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Int + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.String declared in foo.bar.maybeExample.' - CALL 'public open fun toString (): kotlin.String declared in kotlin.Int' type=kotlin.String origin=null - ARG : GET_VAR 'it: kotlin.Int declared in foo.bar.maybeExample..' type=kotlin.Int origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val b: foo.bar.Either declared in foo.bar.maybeExample.' type=foo.bar.Either origin=null + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String): kotlin.String declared in foo.bar.maybeExample.' + STRING_CONCATENATION type=kotlin.String + GET_VAR 'it: kotlin.String declared in foo.bar.maybeExample..' type=kotlin.String origin=null + CONST String type=kotlin.String value="!" VAR name:expected type:foo.bar.Either [val] CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right origin=null TYPE_ARG (of class) A: kotlin.Unit TYPE_ARG (of class) B: kotlin.String - ARG value: CONST String type=kotlin.String value="10" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val expected: foo.bar.Either declared in foo.bar.maybeExample.' type=foo.bar.Either origin=null + ARG value: CONST String type=kotlin.String value="10!" WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -1990,16 +1804,13 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG (of class) A: kotlin.Unit TYPE_ARG (of class) B: kotlin.Int ARG value: CONST Int type=kotlin.Int value=10 - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val a: foo.bar.Either declared in foo.bar.maybeExample2.' type=foo.bar.Either origin=null VAR name:b type:foo.bar.Either [val] CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=foo.bar.Either origin=null TYPE_ARG F: kotlin.Any? TYPE_ARG A: kotlin.Int TYPE_ARG B: kotlin.String ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.maybeExample2.' type=foo.bar.Functor origin=null - ARG : CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null + ARG : CALL 'public final fun expandTo (: T of io.github.kyay10.highkt.expandTo): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=foo.bar.Either origin=null TYPE_ARG T: kotlin.Any? ARG : GET_VAR 'val a: foo.bar.Either declared in foo.bar.maybeExample2.' type=foo.bar.Either origin=null ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA @@ -2009,17 +1820,11 @@ FILE fqName:foo.bar fileName:/type_functions.kt RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.String declared in foo.bar.maybeExample2.' CALL 'public open fun toString (): kotlin.String declared in kotlin.Int' type=kotlin.String origin=null ARG : GET_VAR 'it: kotlin.Int declared in foo.bar.maybeExample2..' type=kotlin.Int origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val b: foo.bar.Either declared in foo.bar.maybeExample2.' type=foo.bar.Either origin=null VAR name:expected type:foo.bar.Either [val] CONSTRUCTOR_CALL 'public constructor (value: B of foo.bar.Right) declared in foo.bar.Right' type=foo.bar.Right origin=null TYPE_ARG (of class) A: kotlin.Unit TYPE_ARG (of class) B: kotlin.String ARG value: CONST String type=kotlin.String value="10" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val expected: foo.bar.Either declared in foo.bar.maybeExample2.' type=foo.bar.Either origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -2047,7 +1852,7 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG A: kotlin.String TYPE_ARG B: kotlin.String ARG functor: GET_VAR '$context-PairFunctor: foo.bar.PairFunctor declared in foo.bar.pairExample.' type=foo.bar.PairFunctor origin=null - ARG : CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + ARG : CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: kotlin.Int TYPE_ARG B: kotlin.String ARG : CONST Int type=kotlin.Int value=1 @@ -2060,9 +1865,6 @@ FILE fqName:foo.bar fileName:/type_functions.kt STRING_CONCATENATION type=kotlin.String GET_VAR 'it: kotlin.String declared in foo.bar.pairExample..' type=kotlin.String origin=null CONST String type=kotlin.String value="!" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val result: kotlin.Pair declared in foo.bar.pairExample.' type=kotlin.Pair origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -2131,9 +1933,6 @@ FILE fqName:foo.bar fileName:/type_functions.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap> declared in foo.bar.rightFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap> origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap>): kotlin.Any? declared in foo.bar.rightFunctor.' CALL 'public final fun rightMap (b: foo.bar.BiFunctor, : kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.rightFunctor @@ -2168,7 +1967,7 @@ FILE fqName:foo.bar fileName:/type_functions.kt TYPE_ARG B: B of foo.bar.rightMap TYPE_ARG D: D of foo.bar.rightMap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.rightMap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.rightMap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.rightMap' type=kotlin.Any? origin=null ARG g: GET_VAR 'g: kotlin.Function1 declared in foo.bar.rightMap' type=kotlin.Function1 origin=null FUN name:vertical visibility:public modality:FINAL returnType:foo.bar.NT [infix] TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false diff --git a/compiler-plugin/testData/box/type_functions.fir.txt b/compiler-plugin/testData/box/type_functions.fir.txt index 52b5e9d..f8ccd91 100644 --- a/compiler-plugin/testData/box/type_functions.fir.txt +++ b/compiler-plugin/testData/box/type_functions.fir.txt @@ -44,13 +44,11 @@ FILE: type_functions.kt super() } - public open override fun pure(a: R|A|): R|io/github/kyay10/highkt/K, A>| { + public open override fun pure(a: R|A|): R|kotlin/collections/List| { ^pure R|kotlin/collections/listOf|(R|/a|) } - public open override fun R|io/github/kyay10/highkt/K, A>|.bind(f: R|(A) -> io/github/kyay10/highkt/K, B>|): R|io/github/kyay10/highkt/K, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| kotlin/collections/List|, R|io/github/kyay10/highkt/K, A>, kotlin/collections/List>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, A>|>(this@R|foo/bar/ListMonad.bind|) + public open override fun R|kotlin/collections/List|.bind(f: R|(A) -> kotlin/collections/List|): R|kotlin/collections/List| { ^bind this@R|foo/bar/ListMonad.bind|.R|kotlin/collections/flatMap|(R|/f|) } @@ -60,18 +58,10 @@ FILE: type_functions.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, L, A>=} io/github/kyay10/highkt/K, L>, A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/K2, L, B>=} io/github/kyay10/highkt/K, L>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, L>, A>|>(this@R|foo/bar/PairFunctor.fmap|) - lval : R|{io/github/kyay10/highkt/K2, L, A>=} io/github/kyay10/highkt/K, L>, A>| = this@R|foo/bar/PairFunctor.fmap| + public open override fun R|kotlin/Pair|.fmap(f: R|(A) -> B|): R|kotlin/Pair| { + lval : R|kotlin/Pair| = this@R|foo/bar/PairFunctor.fmap| lval l: R|L| = R|/|.R|SubstitutionOverride|() - { - } - lval a: R|A| = R|/|.R|SubstitutionOverride|() - { - } - ^fmap R|/l|.R|kotlin/to|(R|/f|.R|SubstitutionOverride|(R|/a|)) } @@ -86,14 +76,12 @@ FILE: type_functions.kt super() } - public open override fun R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, F>, G>, A>|.fmap(f: R|(A) -> B|): R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, F>, G>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|>|>(this@R|foo/bar/.fmap|) - ^fmap R|kotlin/context||, R|foo/bar/Functor|, R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, F>, G>, B>|>(R|/ff|, R|/gg|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, F>, G>, B>| { + public open override fun R|io/github/kyay10/highkt/K>|.fmap(f: R|(A) -> B|): R|io/github/kyay10/highkt/K>| { + ^fmap R|kotlin/context||, R|foo/bar/Functor|, R|io/github/kyay10/highkt/K>|>(R|/ff|, R|/gg|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|io/github/kyay10/highkt/K>| { ^ context(R|/|) this@R|foo/bar/.fmap|.R|foo/bar/fmap||, R|io/github/kyay10/highkt/K|>( = fmap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ context(R|/|) R|/it|.R|foo/bar/fmap|(R|/f|) } - ).R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, F>, G>, B>|>() + ) } ) } @@ -118,8 +106,6 @@ FILE: type_functions.kt } public final typealias Const = R|io/github/kyay10/highkt/K, C>| public final infix fun R|(A) -> B|.compose(g: R|(B) -> C|): R|(A) -> C| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(this@R|foo/bar/compose|) ^compose fun (a: R|A|): R|C| { ^ R|/g|.R|SubstitutionOverride|(this@R|foo/bar/compose|.R|SubstitutionOverride|(R|/a|)) } @@ -130,24 +116,20 @@ FILE: type_functions.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, R, A>=} io/github/kyay10/highkt/K, R>, A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/K2, R, B>=} io/github/kyay10/highkt/K, R>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, R>, A>|>(this@R|foo/bar/ReaderMonad.fmap|) + public open override fun R|foo/bar/Reader|.fmap(f: R|(A) -> B|): R|foo/bar/Reader| { ^fmap R|foo/bar/Reader.Reader|(this@R|foo/bar/ReaderMonad.fmap|.R|SubstitutionOverride A|>|.R|foo/bar/compose|(R|/f|)) } - public open override fun pure(a: R|A|): R|{io/github/kyay10/highkt/K2, R, A>=} io/github/kyay10/highkt/K, R>, A>| { + public open override fun pure(a: R|A|): R|foo/bar/Reader| { ^pure R|foo/bar/Reader.Reader|( = Reader@fun (: R|R|): R|A| { ^ R|/a| } ) } - public open override fun R|{io/github/kyay10/highkt/K2, R, A>=} io/github/kyay10/highkt/K, R>, A>|.bind(f: R|(A) -> {io/github/kyay10/highkt/K2, R, B>=} io/github/kyay10/highkt/K, R>, B>|): R|{io/github/kyay10/highkt/K2, R, B>=} io/github/kyay10/highkt/K, R>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| foo/bar/Reader|, R|io/github/kyay10/highkt/K, A>, foo/bar/Reader>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, R>, A>|>(this@R|foo/bar/ReaderMonad.bind|) + public open override fun R|foo/bar/Reader|.bind(f: R|(A) -> foo/bar/Reader|): R|foo/bar/Reader| { ^bind R|foo/bar/Reader.Reader|( = Reader@fun (r: R|R|): R|B| { - ^ R|/f|.R|kotlin/Function1.invoke|(this@R|foo/bar/ReaderMonad.bind|.R|SubstitutionOverride A|>|.R|SubstitutionOverride|(R|/r|)).R|SubstitutionOverride B|>|.R|SubstitutionOverride|(R|/r|) + ^ R|/f|.R|SubstitutionOverride|>|(this@R|foo/bar/ReaderMonad.bind|.R|SubstitutionOverride A|>|.R|SubstitutionOverride|(R|/r|)).R|SubstitutionOverride B|>|.R|SubstitutionOverride|(R|/r|) } ) } @@ -158,10 +140,8 @@ FILE: type_functions.kt super() } - public open override fun R|io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, C>, A>|.fmap(f: R|(A) -> B|): R|io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, C>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|(this@R|foo/bar/ConstFunctor.fmap|) - ^fmap this@R|foo/bar/ConstFunctor.fmap|.R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, C>, B>|>() + public open override fun R|C|.fmap(f: R|(A) -> B|): R|C| { + ^fmap this@R|foo/bar/ConstFunctor.fmap| } } @@ -170,14 +150,10 @@ FILE: type_functions.kt super() } - public open override fun pure(a: R|A|): R|io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, A>| { - ^pure Q|kotlin/Unit|.R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, kotlin/Unit>, A>|>() + public open override fun pure(a: R|A|): R|kotlin/Unit| { } - public open override fun R|io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, A>|.bind(f: R|(A) -> io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, B>|): R|io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| kotlin/Unit|, R|io/github/kyay10/highkt/K, A>, kotlin/Unit>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|(this@R|foo/bar/UnitMonad.bind|) - ^bind this@R|foo/bar/UnitMonad.bind|.R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, kotlin/Unit>, B>|>() + public open override fun R|kotlin/Unit|.bind(f: R|(A) -> kotlin/Unit|): R|kotlin/Unit| { } } @@ -186,28 +162,17 @@ FILE: type_functions.kt super() } - public open override fun R|io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, A>|.fmap(f: R|(A) -> B|): R|io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|(this@R|foo/bar/IdentityFunctor.fmap|) + public open override fun R|A|.fmap(f: R|(A) -> B|): R|B| { ^fmap R|/f|.R|SubstitutionOverride|(this@R|foo/bar/IdentityFunctor.fmap|) } } public abstract interface BiFunctor : R|kotlin/Any| { public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) ^bimap (this@R|foo/bar/BiFunctor|, (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.bimap|).R|foo/bar/BiFunctor.leftMap|(R|/f|)).R|foo/bar/BiFunctor.rightMap|(R|/g|) } public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.leftMap(f: R|(A) -> C|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) ^leftMap (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.leftMap|).R|foo/bar/BiFunctor.bimap|(R|/f|, = bimap@fun (it: R|B|): R|B| { ^ R|/it| } @@ -215,9 +180,6 @@ FILE: type_functions.kt } public open fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.rightMap(g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) ^rightMap (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.rightMap|).R|foo/bar/BiFunctor.bimap|(bimap@fun (it: R|A|): R|A| { ^ R|/it| } @@ -254,7 +216,6 @@ FILE: type_functions.kt } public open override fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, B>|.fmap(f: R|(B) -> C|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, C>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/f|) ^fmap context(R|/|) this@R|foo/bar/.fmap|.R|foo/bar/rightMap|(R|/f|) } @@ -271,10 +232,8 @@ FILE: type_functions.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/Swap=} io/github/kyay10/highkt/K, F>, A, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, F>, A>, B>|.fmap(f: R|(B) -> C|): R|{io/github/kyay10/highkt/K2<{foo/bar/Swap=} io/github/kyay10/highkt/K, F>, A, C>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, F>, A>, C>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} io/github/kyay10/highkt/K, A>|>(this@R|foo/bar/.fmap|) - ^fmap context(R|/|) this@R|foo/bar/.fmap|.R|foo/bar/leftMap|(R|/f|).R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, F>, A, C>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K, F>, A>, C>|>() + public open override fun R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, A>|.fmap(f: R|(B) -> C|): R|{io/github/kyay10/highkt/K2=} io/github/kyay10/highkt/K, A>| { + ^fmap context(R|/|) this@R|foo/bar/.fmap|.R|foo/bar/leftMap|(R|/f|) } } @@ -317,11 +276,8 @@ FILE: type_functions.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, A, B>=} io/github/kyay10/highkt/K, A>, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2, C, D>=} io/github/kyay10/highkt/K, C>, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, A>, B>|>(this@R|foo/bar/EitherBiFunctor.bimap|) - ^bimap when (lval : R|{io/github/kyay10/highkt/K2, A, B>=} io/github/kyay10/highkt/K, A>, B>| = this@R|foo/bar/EitherBiFunctor.bimap|) { + public open override fun R|foo/bar/Either|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|foo/bar/Either| { + ^bimap when (lval : R|foo/bar/Either| = this@R|foo/bar/EitherBiFunctor.bimap|) { ($subj$ is R|foo/bar/Left|) -> { R|foo/bar/Left.Left|(R|/f|.R|SubstitutionOverride|(this@R|foo/bar/EitherBiFunctor.bimap|.R|SubstitutionOverride|)) } @@ -338,19 +294,10 @@ FILE: type_functions.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2, A, B>=} io/github/kyay10/highkt/K, A>, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2, C, D>=} io/github/kyay10/highkt/K, C>, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, A>, B>|>(this@R|foo/bar/PairBiFunctor.bimap|) - lval : R|{io/github/kyay10/highkt/K2, A, B>=} io/github/kyay10/highkt/K, A>, B>| = this@R|foo/bar/PairBiFunctor.bimap| + public open override fun R|kotlin/Pair|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|kotlin/Pair| { + lval : R|kotlin/Pair| = this@R|foo/bar/PairBiFunctor.bimap| lval a: R|A| = R|/|.R|SubstitutionOverride|() - { - } - lval b: R|B| = R|/|.R|SubstitutionOverride|() - { - } - ^bimap R|/f|.R|SubstitutionOverride|(R|/a|).R|kotlin/to|(R|/g|.R|SubstitutionOverride|(R|/b|)) } @@ -365,10 +312,7 @@ FILE: type_functions.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, A, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, A>, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C, D>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C>, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>(this@R|foo/bar/.bimap|) + public open override fun R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^bimap R|kotlin/context||, R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>(R|/bf|, = context(: R|foo/bar/BiFunctor|) context@fun (): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^ context(R|/|) this@R|foo/bar/.bimap|.R|foo/bar/bimap||, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|, R|BF|>(bimap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ context(R|/|) R|/it|.R|foo/bar/fmap|(R|/f|) @@ -378,7 +322,7 @@ FILE: type_functions.kt } ) } - ).R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C, D>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C>, D>|>() + ) } } @@ -404,10 +348,7 @@ FILE: type_functions.kt super() } - public open override fun R|{io/github/kyay10/highkt/K2<{foo/bar/BiCompose2=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, A, B>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, A>, B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2<{foo/bar/BiCompose2=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C, D>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C>, D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|>, io/github/kyay10/highkt/K>|>(this@R|foo/bar/.bimap|) + public open override fun R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^bimap R|kotlin/context||, R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>|>(R|/bf|, = context(: R|foo/bar/BiFunctor|) context@fun (): R|{io/github/kyay10/highkt/K2, io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K>, io/github/kyay10/highkt/K>| { ^ context(R|/|) this@R|foo/bar/.bimap|.R|foo/bar/bimap||, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|, R|io/github/kyay10/highkt/K|, R|BF|>(bimap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ context(R|/|) R|/it|.R|foo/bar/fmap|(R|/f|) @@ -417,7 +358,7 @@ FILE: type_functions.kt } ) } - ).R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C, D>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, BF, F>=} io/github/kyay10/highkt/K, BF>, F>, G>, C>, D>|>() + ) } } @@ -425,7 +366,7 @@ FILE: type_functions.kt } public final typealias Maybe2 = R|io/github/kyay10/highkt/K| public final typealias Maybe2K = R|{foo/bar/Compose, kotlin/Unit>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>| - public final val maybeFunctor2: R|foo/bar/Functor<{foo/bar/Maybe2K=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>| = R|kotlin/context||, R|foo/bar/IdentityFunctor|, R|foo/bar/Functor<{foo/bar/Compose, io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>|>(Q|foo/bar/EitherBiFunctor|, R|foo/bar/ConstFunctor.ConstFunctor|(), Q|foo/bar/IdentityFunctor|, = context(: R|foo/bar/EitherBiFunctor|, : R|foo/bar/ConstFunctor|, : R|foo/bar/IdentityFunctor|) context@fun (): R|foo/bar/Functor<{foo/bar/Compose, io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>| { + public final val maybeFunctor2: R|foo/bar/Functor<{foo/bar/Maybe2K=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>| = R|kotlin/context||, R|foo/bar/IdentityFunctor|, R|foo/bar/Functor<{io/github/kyay10/highkt/K<{foo/bar/BiCompose2, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, foo/bar/Either<*, *>, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>>=} io/github/kyay10/highkt/K, foo/bar/Either<*, *>>, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/Unit> ~>} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit> ~>} kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>|>(Q|foo/bar/EitherBiFunctor|, R|foo/bar/ConstFunctor.ConstFunctor|(), Q|foo/bar/IdentityFunctor|, = context(: R|foo/bar/EitherBiFunctor|, : R|foo/bar/ConstFunctor|, : R|foo/bar/IdentityFunctor|) context@fun (): R|foo/bar/Functor<{io/github/kyay10/highkt/K<{foo/bar/BiCompose2, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, foo/bar/Either<*, *>, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>>=} io/github/kyay10/highkt/K, foo/bar/Either<*, *>>, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/Unit> ~>} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, {io/github/kyay10/highkt/K<{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, kotlin/Unit> ~>} kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>| { ^ R|kotlin/context|, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>|, R|foo/bar/Functor<{foo/bar/Maybe2K=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>|>(context(R|/|, R|/|, R|/|) R|foo/bar/composeBiFunctors2||, R|{foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>|, R|{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>|>(), = context(: R|foo/bar/BiFunctor, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>|) context@fun (): R|foo/bar/Functor<{foo/bar/Maybe2K=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>| { ^ context(R|/|) R|foo/bar/rightFunctor|, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, foo/bar/Either<*, *>, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>>=} io/github/kyay10/highkt/K, foo/bar/Either<*, *>>, {foo/bar/Const=} io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>|, R|kotlin/Unit|>() } @@ -457,12 +398,11 @@ FILE: type_functions.kt super() } - public open override operator fun invoke(fa: R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, I>, F>, A>|): R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, J>, G>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|>|>(R|/fa|) + public open override operator fun invoke(fa: R|io/github/kyay10/highkt/K>|): R|io/github/kyay10/highkt/K>| { ^invoke R|/other|.R|SubstitutionOverride|>||>(context(R|/|) R|/fa|.R|foo/bar/fmap||, R|io/github/kyay10/highkt/K|>( = fmap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ this@R|foo/bar/horizontalLeft|.R|SubstitutionOverride|>|(R|/it|) } - )).R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, J>, G>, A>|>() + )) } } @@ -475,12 +415,11 @@ FILE: type_functions.kt super() } - public open override operator fun invoke(fa: R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, I>, F>, A>|): R|io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K, J>, G>, A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|>|>(R|/fa|) + public open override operator fun invoke(fa: R|io/github/kyay10/highkt/K>|): R|io/github/kyay10/highkt/K>| { ^invoke context(R|/|) R|/other|.R|SubstitutionOverride|>||>(R|/fa|).R|foo/bar/fmap||, R|io/github/kyay10/highkt/K|>( = fmap@fun (it: R|io/github/kyay10/highkt/K|): R|io/github/kyay10/highkt/K| { ^ this@R|foo/bar/horizontalRight|.R|SubstitutionOverride|>|(R|/it|) } - ).R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K, J>, G>, A>|>() + ) } } @@ -492,7 +431,6 @@ FILE: type_functions.kt ^ (R|/it|, String(!)) } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/String>|>(R|/result|) when () { !=(R|/result|, R|kotlin/collections/listOf|(vararg(String(Hello!), String(World!)))) -> { R|kotlin/error|((R|/result|)) @@ -508,7 +446,6 @@ FILE: type_functions.kt ^ (R|/it|, String(!)) } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Int>, kotlin/String>|>(R|/result|) when () { !=(R|/result|, Int(1).R|kotlin/to|(String(Hello!))) -> { R|kotlin/error|((R|/result|)) @@ -520,15 +457,15 @@ FILE: type_functions.kt } private final fun maybeExample(): R|kotlin/Unit| { ^maybeExample R|kotlin/context|, foo/bar/Const, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/Unit>>|, R|kotlin/Unit|>(R|foo/bar/maybeFunctor|, = context(: R|foo/bar/Functor<{foo/bar/MaybeK=} io/github/kyay10/highkt/K, foo/bar/Const, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/Unit>>|) context@fun (): R|kotlin/Unit| { - lval a: R|foo/bar/Either| = R|foo/bar/Right.Right|(Int(10)) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Unit>, kotlin/Int>|>(R|/a|) - lval b: R|foo/bar/Either| = context(R|/|) R|/a|.R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K|>().R|foo/bar/fmap|, foo/bar/Const, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/Unit>|, R|kotlin/Int|, R|kotlin/String|>( = fmap@fun (it: R|kotlin/Int|): R|kotlin/String| { + lval a: R|{foo/bar/Maybe=} io/github/kyay10/highkt/K| = R|foo/bar/Right.Right|, kotlin/Unit> ~>} kotlin/Unit|, R|{io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, kotlin/Int> ~>} kotlin/Int|>(Int(10)) + lval b: R|{io/github/kyay10/highkt/K<{foo/bar/MaybeK=} io/github/kyay10/highkt/K, foo/bar/Const, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/Unit>, kotlin/String> ~>} foo/bar/Either<{io/github/kyay10/highkt/K, kotlin/Unit> ~>} kotlin/Unit, {io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>, kotlin/String> ~>} kotlin/String>| = context(R|/|) context(R|/|) R|/a|.R|foo/bar/fmap|, foo/bar/Const, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/Unit>|, R|kotlin/Int|, R|kotlin/String|>( = fmap@fun (it: R|kotlin/Int|): R|kotlin/String| { ^ R|/it|.R|kotlin/Int.toString|() } + ).R|foo/bar/fmap|, foo/bar/Const, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/Unit>|, R|kotlin/String|, R|kotlin/String|>( = fmap@fun (it: R|kotlin/String|): R|kotlin/String| { + ^ (R|/it|, String(!)) + } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Unit>, kotlin/String>|>(R|/b|) - lval expected: R|foo/bar/Either| = R|foo/bar/Right.Right|(String(10)) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Unit>, kotlin/String>|>(R|/expected|) + lval expected: R|foo/bar/Either| = R|foo/bar/Right.Right|(String(10!)) when () { !=(R|/b|, R|/expected|) -> { R|kotlin/error|((R|/b|)) @@ -541,14 +478,11 @@ FILE: type_functions.kt private final fun maybeExample2(): R|kotlin/Unit| { ^maybeExample2 R|kotlin/context|, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>|, R|kotlin/Unit|>(R|foo/bar/maybeFunctor2|, = context(: R|foo/bar/Functor<{foo/bar/Maybe2K=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>>|) context@fun (): R|kotlin/Unit| { lval a: R|foo/bar/Either| = R|foo/bar/Right.Right|(Int(10)) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Unit>, kotlin/Int>|>(R|/a|) - lval b: R|foo/bar/Either| = context(R|/|) R|/a|.R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K|>().R|foo/bar/fmap|, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>|, R|kotlin/Int|, R|kotlin/String|>( = fmap@fun (it: R|kotlin/Int|): R|kotlin/String| { + lval b: R|{io/github/kyay10/highkt/K<{foo/bar/Maybe2K=} io/github/kyay10/highkt/K, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>, kotlin/String> ~>} foo/bar/Either, kotlin/String> ~>} kotlin/String>| = context(R|/|) R|/a|.R|io/github/kyay10/highkt/expandTo|=} io/github/kyay10/highkt/K|>().R|foo/bar/fmap|, io/github/kyay10/highkt/K, kotlin/Unit>>, {io/github/kyay10/highkt/Identity=} io/github/kyay10/highkt/Id<*>>|, R|kotlin/Int|, R|kotlin/String|>( = fmap@fun (it: R|kotlin/Int|): R|kotlin/String| { ^ R|/it|.R|kotlin/Int.toString|() } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Unit>, kotlin/String>|>(R|/b|) lval expected: R|foo/bar/Either| = R|foo/bar/Right.Right|(String(10)) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Unit>, kotlin/String>|>(R|/expected|) when () { !=(R|/b|, R|/expected|) -> { R|kotlin/error|((R|/b|)) diff --git a/compiler-plugin/testData/box/type_functions.kt b/compiler-plugin/testData/box/type_functions.kt index 671827b..bd847ad 100644 --- a/compiler-plugin/testData/box/type_functions.kt +++ b/compiler-plugin/testData/box/type_functions.kt @@ -17,22 +17,22 @@ interface Monad : Functor { } context(functor: Functor) -fun K.fmap(f: (A) -> B) = with(functor) { fmap(f) } +fun K.fmap(f: (A) -> B) = with(functor) { this@fmap.fmap(f) } context(monad: Monad) fun pure(a: A) = with(monad) { pure(a) } context(monad: Monad) -fun K.bind(f: (A) -> K) = with(monad) { bind(f) } +fun K.bind(f: (A) -> K) = with(monad) { this@bind.bind(f) } object ListMonad : Monad> { - override fun pure(a: A): K, A> = listOf(a) + override fun pure(a: A) = listOf(a) - override fun K, A>.bind(f: (A) -> K, B>): K, B> = flatMap(f) + override fun List.bind(f: (A) -> List) = flatMap(f) } class PairFunctor : Functor, L>> { - override fun K2, L, A>.fmap(f: (A) -> B): K2, L, B> { + override fun Pair.fmap(f: (A) -> B): Pair { val (l, a) = this return l to f(a) } @@ -44,8 +44,8 @@ typealias Compose = K2, F, G> context(ff: Functor, gg: Functor) fun composeFunctors() = object : Functor> { - override fun K, A>.fmap(f: (A) -> B): K, B> = context(ff, gg) { // KT-81441 - fmap { it.fmap(f) }.expandTo() // TODO remove need for expandTo + override fun K>.fmap(f: (A) -> B) = context(ff, gg) { // KT-81441 + this@fmap.fmap { it.fmap(f) } } } @@ -56,28 +56,27 @@ interface Constant : Id typealias Const = K, C> -infix fun ((A) -> B).compose(g: (B) -> C): (A) -> C = { a: A -> g(this(a)) } +infix fun ((A) -> B).compose(g: (B) -> C) = { a: A -> g(this(a)) } class ReaderMonad : Monad, R>> { - override fun K2, R, A>.fmap(f: (A) -> B): K2, R, B> = Reader(run compose f) + override fun Reader.fmap(f: (A) -> B) = Reader(run compose f) - override fun pure(a: A): K2, R, A> = Reader { _: R -> a } - override fun K2, R, A>.bind(f: (A) -> K2, R, B>): K2, R, B> = - Reader { r: R -> f(run(r)).run(r) } + override fun pure(a: A) = Reader { _: R -> a } + override fun Reader.bind(f: (A) -> Reader) = Reader { r: R -> f(run(r)).run(r) } } class ConstFunctor : Functor> { - override fun K, A>.fmap(f: (A) -> B): K, B> = expandTo, B>>() + override fun C.fmap(f: (A) -> B) = this } object UnitMonad : Monad> { - override fun pure(a: A): K, A> = Unit.expandTo() + override fun pure(a: A) {} - override fun K, A>.bind(f: (A) -> K, B>): K, B> = expandTo() + override fun Unit.bind(f: (A) -> Unit) {} } object IdentityFunctor : Functor { - override fun K.fmap(f: (A) -> B): K = f(this) + override fun A.fmap(f: (A) -> B) = f(this) } interface BiFunctor { @@ -87,17 +86,17 @@ interface BiFunctor { } context(b: BiFunctor) -fun K2.bimap(f: (A) -> C, g: (B) -> D) = with(b) { bimap(f, g) } +fun K2.bimap(f: (A) -> C, g: (B) -> D) = with(b) { this@bimap.bimap(f, g) } context(b: BiFunctor) -fun K2.leftMap(f: (A) -> C) = with(b) { leftMap(f) } +fun K2.leftMap(f: (A) -> C) = with(b) { this@leftMap.leftMap(f) } context(b: BiFunctor) -fun K2.rightMap(g: (B) -> D) = with(b) { rightMap(g) } +fun K2.rightMap(g: (B) -> D) = with(b) { this@rightMap.rightMap(g) } context(_: BiFunctor) fun rightFunctor() = object : Functor> { - override fun K2.fmap(f: (B) -> C): K2 = rightMap(f) + override fun K2.fmap(f: (B) -> C) = rightMap(f) } @TypeFunction @@ -106,7 +105,7 @@ typealias Swap = K, F> context(_: BiFunctor) fun leftFunctor() = object : Functor, A>> { - override fun K2, A, B>.fmap(f: (B) -> C): K2, A, C> = leftMap(f).expandTo, A, C>>() + override fun K2.fmap(f: (B) -> C) = leftMap(f) } sealed class Either @@ -114,15 +113,14 @@ data class Left(val value: A) : Either() data class Right(val value: B) : Either() object EitherBiFunctor : BiFunctor> { - override fun K2, A, B>.bimap(f: (A) -> C, g: (B) -> D): K2, C, D> = - when (this) { - is Left -> Left(f(value)) - is Right -> Right(g(value)) - } + override fun Either.bimap(f: (A) -> C, g: (B) -> D): Either = when (this) { + is Left -> Left(f(value)) + is Right -> Right(g(value)) + } } object PairBiFunctor : BiFunctor> { - override fun K2, A, B>.bimap(f: (A) -> C, g: (B) -> D): K2, C, D> { + override fun Pair.bimap(f: (A) -> C, g: (B) -> D): Pair { val (a, b) = this return f(a) to g(b) } @@ -134,12 +132,10 @@ typealias BiCompose = K3, Bi, F, G> context(bf: BiFunctor, _: Functor, _: Functor) fun composeBiFunctors() = object : BiFunctor> { - override fun K2, A, B>.bimap( + override fun K2, K>.bimap( f: (A) -> C, g: (B) -> D - ): K2, C, D> = context(bf) { // KT-81441 - bimap<_, _, _, _, BF>({ it.fmap(f) }) { it.fmap(g) } - }.expandTo, C, D>>() + ) = context(bf) { this@bimap.bimap<_, _, _, _, BF>({ it.fmap(f) }) { it.fmap(g) } } // KT-81441 } typealias Maybe = K @@ -157,12 +153,10 @@ typealias BiCompose2 = K3, Bi, F, G> context(bf: BiFunctor, _: Functor, _: Functor) fun composeBiFunctors2() = object : BiFunctor> { - override fun K2, A, B>.bimap( + override fun K2, K>.bimap( f: (A) -> C, g: (B) -> D - ): K2, C, D> = context(bf) { // KT-81441 - bimap<_, _, _, _, BF>({ it.fmap(f) }) { it.fmap(g) } - }.expandTo, C, D>>() + ) = context(bf) { this@bimap.bimap<_, _, _, _, BF>({ it.fmap(f) }) { it.fmap(g) } } // KT-81441 } typealias Maybe2 = K @@ -179,19 +173,17 @@ interface NT { } infix fun NT.vertical(other: NT) = object : NT { - override fun invoke(fa: K): K = other(this@vertical(fa)) + override fun invoke(fa: K) = other(this@vertical(fa)) } context(_: Functor) infix fun NT.horizontalLeft(other: NT) = object : NT, Compose> { - override fun invoke(fa: K, A>): K, A> = - other(fa.fmap, K> { this@horizontalLeft(it) }).expandTo, A>>() + override fun invoke(fa: K>) = other(fa.fmap { this@horizontalLeft(it) }) } context(_: Functor) infix fun NT.horizontalRight(other: NT) = object : NT, Compose> { - override fun invoke(fa: K, A>): K, A> = - other(fa).fmap { this@horizontalRight(it) }.expandTo, A>>() + override fun invoke(fa: K>) = other(fa).fmap { this@horizontalRight(it) } } // ---------------------------------------------------------------- @@ -207,15 +199,15 @@ private fun pairExample() = context(PairFunctor()) { } private fun maybeExample() = context(maybeFunctor) { - val a: Either = Right(10) - val b = a.expandTo>().fmap { it.toString() } - val expected: Either = Right("10") + val a: Maybe = Right(10) + val b = a.fmap { it.toString() }.fmap { "$it!" } // look ma! no expandTo needed + val expected: Either = Right("10!") if (b != expected) error("$b") } private fun maybeExample2() = context(maybeFunctor2) { val a: Either = Right(10) - val b = a.expandTo>().fmap { it.toString() } + val b = a.expandTo>().fmap { it.toString() } // intentionally showcasing expandTo val expected: Either = Right("10") if (b != expected) error("$b") } diff --git a/compiler-plugin/testData/box/variance.fir.ir.txt b/compiler-plugin/testData/box/variance.fir.ir.txt index 578bca2..b413661 100644 --- a/compiler-plugin/testData/box/variance.fir.ir.txt +++ b/compiler-plugin/testData/box/variance.fir.ir.txt @@ -2,11 +2,11 @@ FILE fqName:foo.bar fileName:/variance.kt PROPERTY name:maybeFunctor visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:maybeFunctor type:foo.bar.Functor visibility:private [final,static] EXPRESSION_BODY - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): Result of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, c: C of kotlin.context, block: @[ContextFunctionTypeParams(count = 3)] kotlin.Function3): R of kotlin.context declared in kotlin' type=foo.bar.Functor origin=null TYPE_ARG A: foo.bar.EitherBiFunctor TYPE_ARG B: foo.bar.ConstFunctor TYPE_ARG C: foo.bar.IdentityFunctor - TYPE_ARG Result: foo.bar.Functor + TYPE_ARG R: foo.bar.Functor ARG a: GET_OBJECT 'CLASS OBJECT name:EitherBiFunctor modality:FINAL visibility:public superTypes:[foo.bar.BiFunctor>]' type=foo.bar.EitherBiFunctor ARG b: CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.ConstFunctor' type=foo.bar.ConstFunctor origin=null TYPE_ARG (of class) C: kotlin.Unit @@ -367,20 +367,12 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ConstFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Const - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ConstFunctor' - CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=foo.bar.Const origin=null TYPE_ARG (of class) C: C of foo.bar.ConstFunctor TYPE_ARG (of class) A: B of foo.bar.ConstFunctor.fmap ARG value: CALL 'public final fun (): C of foo.bar.Const declared in foo.bar.Const' type=C of foo.bar.ConstFunctor origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Const origin=IMPLICIT_CAST typeOperand=foo.bar.Const - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ConstFunctor.fmap' type=foo.bar.Const origin=IMPLICIT_ARGUMENT CLASS CLASS name:Either modality:SEALED visibility:public superTypes:[kotlin.Any] sealedSubclasses: CLASS CLASS name:Left modality:FINAL visibility:public [data] superTypes:[foo.bar.Either] @@ -636,27 +628,16 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.PairFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Pair [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null VAR name:l type:L of foo.bar.PairFunctor [val] CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=L of foo.bar.PairFunctor origin=COMPONENT_N(index=1) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_5: kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_5: kotlin.Pair declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null VAR name:a type:A of foo.bar.PairFunctor.fmap [val] CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=A of foo.bar.PairFunctor.fmap origin=COMPONENT_N(index=2) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_5: kotlin.Any? declared in foo.bar.PairFunctor.fmap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_5: kotlin.Pair declared in foo.bar.PairFunctor.fmap' type=kotlin.Pair origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.PairFunctor' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: L of foo.bar.PairFunctor TYPE_ARG B: B of foo.bar.PairFunctor.fmap ARG : GET_VAR 'val l: L of foo.bar.PairFunctor declared in foo.bar.PairFunctor.fmap' type=L of foo.bar.PairFunctor origin=null @@ -785,16 +766,8 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Reader - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: B of foo.bar.ReaderMonad.bind ARG run: FUN_EXPR type=kotlin.Function1 origin=LAMBDA @@ -804,13 +777,11 @@ FILE fqName:foo.bar fileName:/variance.kt RETURN type=kotlin.Nothing from='local final fun (r: R of foo.bar.ReaderMonad): B of foo.bar.ReaderMonad.bind declared in foo.bar.ReaderMonad.bind' CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.ReaderMonad.bind origin=INVOKE ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY - ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=foo.bar.Reader origin=INVOKE - ARG : TYPE_OP type=kotlin.Function1> origin=IMPLICIT_CAST typeOperand=kotlin.Function1> - GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1 origin=null + ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=foo.bar.Reader origin=INVOKE + ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.bind' type=kotlin.Function1> origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=A of foo.bar.ReaderMonad.bind origin=INVOKE ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Reader origin=IMPLICIT_CAST typeOperand=foo.bar.Reader - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.bind' type=foo.bar.Reader origin=IMPLICIT_ARGUMENT ARG p1: GET_VAR 'r: R of foo.bar.ReaderMonad declared in foo.bar.ReaderMonad.bind.' type=R of foo.bar.ReaderMonad origin=null ARG p1: GET_VAR 'r: R of foo.bar.ReaderMonad declared in foo.bar.ReaderMonad.bind.' type=R of foo.bar.ReaderMonad origin=null FUN name:fmap visibility:public modality:OPEN returnType:kotlin.Any? @@ -822,15 +793,8 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Reader - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: B of foo.bar.ReaderMonad.fmap ARG run: CALL 'public final fun compose (: kotlin.Function1, g: kotlin.Function1): kotlin.Function1 declared in foo.bar' type=kotlin.Function1 origin=null @@ -838,18 +802,17 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG B: A of foo.bar.ReaderMonad.fmap TYPE_ARG C: B of foo.bar.ReaderMonad.fmap ARG : CALL 'public final fun (): kotlin.Function1 declared in foo.bar.Reader' type=kotlin.Function1 origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Reader origin=IMPLICIT_CAST typeOperand=foo.bar.Reader - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ReaderMonad.fmap' type=foo.bar.Reader origin=IMPLICIT_ARGUMENT ARG g: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ReaderMonad.fmap' type=kotlin.Function1 origin=null - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:pure visibility:public modality:OPEN returnType:foo.bar.Reader TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.ReaderMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.ReaderMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ReaderMonad.pure): kotlin.Any? declared in foo.bar.ReaderMonad' - CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ReaderMonad.pure): foo.bar.Reader declared in foo.bar.ReaderMonad' + CONSTRUCTOR_CALL 'public constructor (run: kotlin.Function1) declared in foo.bar.Reader' type=foo.bar.Reader origin=null TYPE_ARG (of class) R: R of foo.bar.ReaderMonad TYPE_ARG (of class) A: A of foo.bar.ReaderMonad.pure ARG run: FUN_EXPR type=kotlin.Function1 origin=LAMBDA @@ -1081,18 +1044,6 @@ FILE fqName:foo.bar fileName:/variance.kt VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.Function1 VALUE_PARAMETER kind:Regular name:g index:3 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.bimap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun rightMap (: kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: C of foo.bar.BiFunctor.bimap @@ -1115,12 +1066,6 @@ FILE fqName:foo.bar fileName:/variance.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? VALUE_PARAMETER kind:Regular name:f index:2 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.BiFunctor.leftMap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun leftMap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.BiFunctor.leftMap @@ -1144,12 +1089,6 @@ FILE fqName:foo.bar fileName:/variance.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.Any? VALUE_PARAMETER kind:Regular name:g index:2 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.BiFunctor.rightMap' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public open fun rightMap (: kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' CALL 'public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.BiFunctor.rightMap @@ -1309,41 +1248,31 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Either - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.EitherBiFunctor' - BLOCK type=kotlin.Any? origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null - WHEN type=kotlin.Any? origin=WHEN + BLOCK type=foo.bar.Either origin=WHEN + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:foo.bar.Either [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null + WHEN type=foo.bar.Either origin=WHEN BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=foo.bar.Left - GET_VAR 'val tmp_9: kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null - then: CALL 'public final fun left (: A of foo.bar.left): foo.bar.Either declared in foo.bar' type=kotlin.Any? origin=null + GET_VAR 'val tmp_9: foo.bar.Either declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null + then: CALL 'public final fun left (: A of foo.bar.left): foo.bar.Either declared in foo.bar' type=foo.bar.Either origin=null TYPE_ARG A: C of foo.bar.EitherBiFunctor.bimap ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=C of foo.bar.EitherBiFunctor.bimap origin=INVOKE ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public final fun (): A of foo.bar.Left declared in foo.bar.Left' type=A of foo.bar.EitherBiFunctor.bimap origin=GET_PROPERTY ARG : TYPE_OP type=foo.bar.Left origin=IMPLICIT_CAST typeOperand=foo.bar.Left - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=IMPLICIT_ARGUMENT BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=foo.bar.Right - GET_VAR 'val tmp_9: kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=null - then: CALL 'public final fun right (: A of foo.bar.right): foo.bar.Either declared in foo.bar' type=kotlin.Any? origin=null + GET_VAR 'val tmp_9: foo.bar.Either declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=null + then: CALL 'public final fun right (: A of foo.bar.right): foo.bar.Either declared in foo.bar' type=foo.bar.Either origin=null TYPE_ARG A: D of foo.bar.EitherBiFunctor.bimap ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=D of foo.bar.EitherBiFunctor.bimap origin=INVOKE ARG : GET_VAR 'g: kotlin.Function1 declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public final fun (): B of foo.bar.Right declared in foo.bar.Right' type=B of foo.bar.EitherBiFunctor.bimap origin=GET_PROPERTY ARG : TYPE_OP type=foo.bar.Right origin=IMPLICIT_CAST typeOperand=foo.bar.Right - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.EitherBiFunctor.bimap' type=foo.bar.Either origin=IMPLICIT_ARGUMENT BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public final fun noWhenBranchMatchedException (): kotlin.Nothing declared in kotlin.internal.ir' type=kotlin.Nothing origin=null @@ -1375,21 +1304,13 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Identity - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.IdentityFunctor' - CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null TYPE_ARG (of class) A: B of foo.bar.IdentityFunctor.fmap ARG value: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=B of foo.bar.IdentityFunctor.fmap origin=INVOKE ARG : GET_VAR 'f: kotlin.Function1 declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION ARG p1: CALL 'public final fun (): A of foo.bar.Identity declared in foo.bar.Identity' type=A of foo.bar.IdentityFunctor.fmap origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Identity origin=IMPLICIT_CAST typeOperand=foo.bar.Identity - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.IdentityFunctor.fmap' type=foo.bar.Identity origin=IMPLICIT_ARGUMENT CLASS OBJECT name:ListMonad modality:FINAL visibility:public superTypes:[foo.bar.Monad>] thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.ListMonad CONSTRUCTOR visibility:private returnType:foo.bar.ListMonad [primary] @@ -1426,31 +1347,21 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.collections.List - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.ListMonad' - CALL 'public final fun flatMap (: kotlin.collections.Iterable, transform: kotlin.Function1>): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + CALL 'public final fun flatMap (: kotlin.collections.Iterable, transform: kotlin.Function1>): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: A of foo.bar.ListMonad.bind TYPE_ARG R: B of foo.bar.ListMonad.bind - ARG : TYPE_OP type=kotlin.collections.List origin=IMPLICIT_CAST typeOperand=kotlin.collections.List - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT - ARG transform: TYPE_OP type=kotlin.Function1> origin=IMPLICIT_CAST typeOperand=kotlin.Function1> - GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1 origin=null - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.ListMonad.bind' type=kotlin.collections.List origin=IMPLICIT_ARGUMENT + ARG transform: GET_VAR 'f: kotlin.Function1 declared in foo.bar.ListMonad.bind' type=kotlin.Function1> origin=null + FUN name:pure visibility:public modality:OPEN returnType:kotlin.collections.List TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.ListMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.ListMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ListMonad.pure): kotlin.Any? declared in foo.bar.ListMonad' - CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.ListMonad.pure): kotlin.collections.List declared in foo.bar.ListMonad' + CALL 'public final fun listOf (element: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: A of foo.bar.ListMonad.pure ARG element: GET_VAR 'a: A of foo.bar.ListMonad.pure declared in foo.bar.ListMonad.pure' type=A of foo.bar.ListMonad.pure origin=null CLASS OBJECT name:PairBiFunctor modality:FINAL visibility:public superTypes:[foo.bar.BiFunctor>] @@ -1502,30 +1413,16 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Pair - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Any? [val] - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Pair [val] + GET_VAR '(index:1): kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null VAR name:a type:A of foo.bar.PairBiFunctor.bimap [val] CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=A of foo.bar.PairBiFunctor.bimap origin=COMPONENT_N(index=1) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_10: kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_10: kotlin.Pair declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null VAR name:b type:B of foo.bar.PairBiFunctor.bimap [val] CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=B of foo.bar.PairBiFunctor.bimap origin=COMPONENT_N(index=2) - ARG : TYPE_OP type=kotlin.Pair origin=IMPLICIT_CAST typeOperand=kotlin.Pair - GET_VAR 'val tmp_10: kotlin.Any? declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Any? origin=null - BLOCK type=kotlin.Unit origin=null + ARG : GET_VAR 'val tmp_10: kotlin.Pair declared in foo.bar.PairBiFunctor.bimap' type=kotlin.Pair origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.PairBiFunctor' - CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: C of foo.bar.PairBiFunctor.bimap TYPE_ARG B: D of foo.bar.PairBiFunctor.bimap ARG : CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=C of foo.bar.PairBiFunctor.bimap origin=INVOKE @@ -1570,28 +1467,20 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: kotlin.Function1> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1 declared in foo.bar.UnitMonad.bind' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Const - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.UnitMonad.bind' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bind (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.UnitMonad' - CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=kotlin.Any? origin=null + CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=foo.bar.Const origin=null TYPE_ARG (of class) C: kotlin.Unit TYPE_ARG (of class) A: B of foo.bar.UnitMonad.bind ARG value: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - FUN name:pure visibility:public modality:OPEN returnType:kotlin.Any? + FUN name:pure visibility:public modality:OPEN returnType:foo.bar.Const TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.UnitMonad VALUE_PARAMETER kind:Regular name:a index:1 type:A of foo.bar.UnitMonad.pure overridden: public abstract fun pure (a: A of foo.bar.Monad.pure): kotlin.Any? declared in foo.bar.Monad BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.UnitMonad.pure): kotlin.Any? declared in foo.bar.UnitMonad' - CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='public open fun pure (a: A of foo.bar.UnitMonad.pure): foo.bar.Const declared in foo.bar.UnitMonad' + CONSTRUCTOR_CALL 'public constructor (value: C of foo.bar.Const) declared in foo.bar.Const' type=foo.bar.Const origin=null TYPE_ARG (of class) C: kotlin.Unit TYPE_ARG (of class) A: A of foo.bar.UnitMonad.pure ARG value: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit @@ -1622,7 +1511,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG C: C of foo.bar.bimap TYPE_ARG D: D of foo.bar.bimap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.bimap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bimap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.bimap' type=kotlin.Function1 origin=null ARG g: GET_VAR 'g: kotlin.Function1 declared in foo.bar.bimap' type=kotlin.Function1 origin=null FUN name:bind visibility:public modality:FINAL returnType:kotlin.Any? @@ -1647,7 +1536,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG A: A of foo.bar.bind TYPE_ARG B: B of foo.bar.bind ARG (index:0): GET_VAR '$this$with: foo.bar.Monad declared in foo.bar.bind.' type=foo.bar.Monad origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bind' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.bind' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.bind' type=kotlin.Function1 origin=null FUN name:box visibility:public modality:FINAL returnType:kotlin.String BLOCK_BODY @@ -1663,12 +1552,6 @@ FILE fqName:foo.bar fileName:/variance.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.Function1 VALUE_PARAMETER kind:Regular name:g index:1 type:kotlin.Function1 BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1 declared in foo.bar.compose' type=kotlin.Function1 origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR ': kotlin.Function1 declared in foo.bar.compose' type=kotlin.Function1 origin=null RETURN type=kotlin.Nothing from='public final fun compose (: kotlin.Function1, g: kotlin.Function1): kotlin.Function1 declared in foo.bar' FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:C of foo.bar.compose @@ -1739,18 +1622,8 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public open fun bimap (: kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar.BiFunctor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.BiComposed.bimap, out B of foo.bar.composeBiFunctors..bimap> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun bimap (: kotlin.Any?, f: kotlin.Function1.bimap, C of foo.bar.composeBiFunctors..bimap>, g: kotlin.Function1.bimap, D of foo.bar.composeBiFunctors..bimap>): kotlin.Any? declared in foo.bar.composeBiFunctors.' - CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=foo.bar.BiComposed.bimap, D of foo.bar.composeBiFunctors..bimap> origin=null TYPE_ARG T: kotlin.Any? TYPE_ARG R: foo.bar.BiComposed.bimap, D of foo.bar.composeBiFunctors..bimap> ARG : CALL 'public final fun bimap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -1761,8 +1634,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG F: BF of foo.bar.composeBiFunctors ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.composeBiFunctors' type=foo.bar.BiFunctor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.BiComposed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.BiComposed.bimap, out B of foo.bar.composeBiFunctors..bimap> origin=IMPLICIT_CAST typeOperand=foo.bar.BiComposed.bimap, out B of foo.bar.composeBiFunctors..bimap> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeBiFunctors..bimap' type=foo.bar.BiComposed.bimap, B of foo.bar.composeBiFunctors..bimap> origin=IMPLICIT_ARGUMENT ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -1830,27 +1702,20 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> declared in foo.bar.composeFunctors..fmap' type=kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Composed.fmap> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, B of foo.bar.composeFunctors..fmap>): kotlin.Any? declared in foo.bar.composeFunctors.' - CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): Result of kotlin.context declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun context (a: A of kotlin.context, b: B of kotlin.context, block: @[ContextFunctionTypeParams(count = 2)] kotlin.Function2): R of kotlin.context declared in kotlin' type=foo.bar.Composed.fmap> origin=null TYPE_ARG A: foo.bar.Functor TYPE_ARG B: foo.bar.Functor - TYPE_ARG Result: kotlin.Any? + TYPE_ARG R: foo.bar.Composed.fmap> ARG a: GET_VAR 'ff: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null ARG b: GET_VAR 'gg: foo.bar.Functor declared in foo.bar.composeFunctors' type=foo.bar.Functor origin=null - ARG block: FUN_EXPR type=kotlin.Function2, foo.bar.Functor, kotlin.Any?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? + ARG block: FUN_EXPR type=kotlin.Function2, foo.bar.Functor, foo.bar.Composed.fmap>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:foo.bar.Composed.fmap> VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#1 index:0 type:foo.bar.Functor VALUE_PARAMETER UNDERSCORE_PARAMETER kind:Context name:$context-Functor#2 index:1 type:foo.bar.Functor BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor, $context-Functor#2: foo.bar.Functor): kotlin.Any? declared in foo.bar.composeFunctors..fmap' - CONSTRUCTOR_CALL 'public constructor (value: kotlin.Any?) declared in foo.bar.Composed' type=kotlin.Any? origin=null + RETURN type=kotlin.Nothing from='local final fun ($context-Functor#1: foo.bar.Functor, $context-Functor#2: foo.bar.Functor): foo.bar.Composed.fmap> declared in foo.bar.composeFunctors..fmap' + CONSTRUCTOR_CALL 'public constructor (value: kotlin.Any?) declared in foo.bar.Composed' type=foo.bar.Composed.fmap> origin=null TYPE_ARG (of class) F: F of foo.bar.composeFunctors TYPE_ARG (of class) G: G of foo.bar.composeFunctors TYPE_ARG (of class) A: B of foo.bar.composeFunctors..fmap @@ -1860,8 +1725,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG B: kotlin.Any? ARG functor: GET_VAR '$context-Functor#1: foo.bar.Functor declared in foo.bar.composeFunctors..fmap.' type=foo.bar.Functor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.Composed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Composed.fmap> origin=IMPLICIT_CAST typeOperand=foo.bar.Composed.fmap> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.composeFunctors..fmap' type=foo.bar.Composed.fmap> origin=IMPLICIT_ARGUMENT ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -1897,7 +1761,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG A: A of foo.bar.fmap TYPE_ARG B: B of foo.bar.fmap ARG (index:0): GET_VAR '$this$with: foo.bar.Functor declared in foo.bar.fmap.' type=foo.bar.Functor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.fmap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.fmap' type=kotlin.Function1 origin=null FUN name:horizontalLeft visibility:public modality:FINAL returnType:foo.bar.NT [infix] TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -1936,12 +1800,8 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Composed.invoke> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalLeft.' - CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=foo.bar.Composed.invoke> origin=null TYPE_ARG T: kotlin.Any? TYPE_ARG R: foo.bar.Composed.invoke> ARG : CALL 'public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT' type=kotlin.Any? origin=null @@ -1953,8 +1813,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG B: kotlin.Any? ARG functor: GET_VAR '$context-Functor: foo.bar.Functor declared in foo.bar.horizontalLeft' type=foo.bar.Functor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.Composed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Composed.invoke> origin=IMPLICIT_CAST typeOperand=foo.bar.Composed.invoke> - GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=kotlin.Any? origin=null + ARG : GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalLeft..invoke' type=foo.bar.Composed.invoke> origin=null ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -2006,12 +1865,8 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.NT BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Composed.invoke> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun invoke (fa: kotlin.Any?): kotlin.Any? declared in foo.bar.horizontalRight.' - CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=foo.bar.Composed.invoke> origin=null TYPE_ARG T: kotlin.Any? TYPE_ARG R: foo.bar.Composed.invoke> ARG : CALL 'public final fun fmap (functor: foo.bar.Functor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -2023,8 +1878,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG A: kotlin.Any? ARG : GET_VAR 'other: foo.bar.NT declared in foo.bar.horizontalRight' type=foo.bar.NT origin=VARIABLE_AS_FUNCTION ARG fa: CALL 'public final fun (): kotlin.Any? declared in foo.bar.Composed' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Composed.invoke> origin=IMPLICIT_CAST typeOperand=foo.bar.Composed.invoke> - GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=kotlin.Any? origin=null + ARG : GET_VAR 'fa: kotlin.Any? declared in foo.bar.horizontalRight..invoke' type=foo.bar.Composed.invoke> origin=null ARG f: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Any? VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.Any? @@ -2082,15 +1936,8 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> declared in foo.bar.leftFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T1: foo.bar.Swapped.fmap> - TYPE_ARG T2: kotlin.Any? - ARG x: GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=kotlin.Any? origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap>): kotlin.Any? declared in foo.bar.leftFunctor.' - CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Any? origin=null + CALL 'public final fun let (: T of kotlin.let, block: kotlin.Function1): R of kotlin.let declared in kotlin' type=foo.bar.Swapped.fmap> origin=null TYPE_ARG T: kotlin.Any? TYPE_ARG R: foo.bar.Swapped.fmap> ARG : CALL 'public final fun leftMap (b: foo.bar.BiFunctor, : kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null @@ -2100,8 +1947,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG F: F of foo.bar.leftFunctor ARG b: GET_VAR '$context-BiFunctor: foo.bar.BiFunctor declared in foo.bar.leftFunctor' type=foo.bar.BiFunctor origin=null ARG : CALL 'public final fun (): kotlin.Any? declared in foo.bar.Swapped' type=kotlin.Any? origin=GET_PROPERTY - ARG : TYPE_OP type=foo.bar.Swapped.fmap> origin=IMPLICIT_CAST typeOperand=foo.bar.Swapped.fmap> - GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG : GET_VAR '(index:1): kotlin.Any? declared in foo.bar.leftFunctor..fmap' type=foo.bar.Swapped.fmap> origin=IMPLICIT_ARGUMENT ARG f: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> declared in foo.bar.leftFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.leftFunctor..fmap> origin=null ARG block: FUNCTION_REFERENCE 'public constructor (value: kotlin.Any?) declared in foo.bar.Swapped' type=kotlin.reflect.KFunction1.fmap>> origin=null reflectionTarget= TYPE_ARG F: F of foo.bar.leftFunctor @@ -2132,7 +1978,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG B: B of foo.bar.leftMap TYPE_ARG C: C of foo.bar.leftMap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.leftMap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.leftMap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.leftMap' type=kotlin.Any? origin=null ARG f: GET_VAR 'f: kotlin.Function1 declared in foo.bar.leftMap' type=kotlin.Function1 origin=null FUN name:listExample visibility:private modality:FINAL returnType:kotlin.Unit BLOCK_BODY @@ -2151,7 +1997,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG A: kotlin.String TYPE_ARG B: kotlin.String ARG functor: GET_VAR '$context-ListMonad: foo.bar.ListMonad declared in foo.bar.listExample.' type=foo.bar.ListMonad origin=null - ARG : CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.Any? origin=null + ARG : CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null TYPE_ARG T: kotlin.String ARG elements: VARARG type=kotlin.Array varargElementType=kotlin.String CONST String type=kotlin.String value="Hello" @@ -2164,9 +2010,6 @@ FILE fqName:foo.bar fileName:/variance.kt STRING_CONCATENATION type=kotlin.String GET_VAR 'it: kotlin.String declared in foo.bar.listExample..' type=kotlin.String origin=null CONST String type=kotlin.String value="!" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val result: kotlin.collections.List declared in foo.bar.listExample.' type=kotlin.collections.List origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -2198,16 +2041,11 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG (of class) G: foo.bar.Identity<*> TYPE_ARG (of class) A: kotlin.Unit TYPE_ARG (of class) B: kotlin.Int - ARG value: CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CALL 'public final fun right (: A of foo.bar.right): foo.bar.Either declared in foo.bar' type=foo.bar.Either> origin=null - TYPE_ARG A: foo.bar.Identity - ARG : CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null - TYPE_ARG (of class) A: kotlin.Int - ARG value: CONST Int type=kotlin.Int value=10 - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val a: foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.Int> declared in foo.bar.maybeExample.' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.Int> origin=null + ARG value: CALL 'public final fun right (: A of foo.bar.right): foo.bar.Either declared in foo.bar' type=foo.bar.Either> origin=null + TYPE_ARG A: foo.bar.Identity + ARG : CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null + TYPE_ARG (of class) A: kotlin.Int + ARG value: CONST Int type=kotlin.Int value=10 VAR name:b type:foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> [val] CALL 'public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor' type=foo.bar.BiComposed, out io.github.kyay10.highkt.K, out kotlin.Unit>, out foo.bar.Identity<*>, out kotlin.Unit, out kotlin.String> origin=null TYPE_ARG A: kotlin.Int @@ -2221,9 +2059,6 @@ FILE fqName:foo.bar fileName:/variance.kt RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.String declared in foo.bar.maybeExample.' CALL 'public open fun toString (): kotlin.String declared in kotlin.Int' type=kotlin.String origin=null ARG : GET_VAR 'it: kotlin.Int declared in foo.bar.maybeExample..' type=kotlin.Int origin=null - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val b: foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> declared in foo.bar.maybeExample.' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> origin=null VAR name:expected type:foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> [val] CONSTRUCTOR_CALL 'public constructor (value: kotlin.Any?) declared in foo.bar.BiComposed' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> origin=null TYPE_ARG (of class) BI: foo.bar.Either<*, *> @@ -2231,16 +2066,11 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG (of class) G: foo.bar.Identity<*> TYPE_ARG (of class) A: kotlin.Unit TYPE_ARG (of class) B: kotlin.String - ARG value: CALL 'public final fun expandTo (: kotlin.Any?): T of io.github.kyay10.highkt.expandTo declared in io.github.kyay10.highkt' type=kotlin.Any? origin=null - TYPE_ARG T: kotlin.Any? - ARG : CALL 'public final fun right (: A of foo.bar.right): foo.bar.Either declared in foo.bar' type=foo.bar.Either> origin=null - TYPE_ARG A: foo.bar.Identity - ARG : CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null - TYPE_ARG (of class) A: kotlin.String - ARG value: CONST String type=kotlin.String value="10" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val expected: foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> declared in foo.bar.maybeExample.' type=foo.bar.BiComposed, kotlin.Any?, foo.bar.Identity<*>, kotlin.Unit, kotlin.String> origin=null + ARG value: CALL 'public final fun right (: A of foo.bar.right): foo.bar.Either declared in foo.bar' type=foo.bar.Either> origin=null + TYPE_ARG A: foo.bar.Identity + ARG : CONSTRUCTOR_CALL 'public constructor (value: A of foo.bar.Identity) declared in foo.bar.Identity' type=foo.bar.Identity origin=null + TYPE_ARG (of class) A: kotlin.String + ARG value: CONST String type=kotlin.String value="10" WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -2268,7 +2098,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG A: kotlin.String TYPE_ARG B: kotlin.String ARG functor: GET_VAR '$context-PairFunctor: foo.bar.PairFunctor declared in foo.bar.pairExample.' type=foo.bar.PairFunctor origin=null - ARG : CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Any? origin=null + ARG : CALL 'public final fun to (: A of kotlin.to, that: B of kotlin.to): kotlin.Pair declared in kotlin' type=kotlin.Pair origin=null TYPE_ARG A: kotlin.Int TYPE_ARG B: kotlin.String ARG : CONST Int type=kotlin.Int value=1 @@ -2281,9 +2111,6 @@ FILE fqName:foo.bar fileName:/variance.kt STRING_CONCATENATION type=kotlin.String GET_VAR 'it: kotlin.String declared in foo.bar.pairExample..' type=kotlin.String origin=null CONST String type=kotlin.String value="!" - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'val result: kotlin.Pair declared in foo.bar.pairExample.' type=kotlin.Pair origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -2360,9 +2187,6 @@ FILE fqName:foo.bar fileName:/variance.kt overridden: public abstract fun fmap (: kotlin.Any?, f: kotlin.Function1): kotlin.Any? declared in foo.bar.Functor BLOCK_BODY - CALL 'public final fun assertIsType (x: kotlin.Any?): kotlin.Unit declared in io.github.kyay10.highkt' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Any? - ARG x: GET_VAR 'f: kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap> declared in foo.bar.rightFunctor..fmap' type=kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap> origin=null RETURN type=kotlin.Nothing from='public open fun fmap (: kotlin.Any?, f: kotlin.Function1.fmap, C of foo.bar.rightFunctor..fmap>): kotlin.Any? declared in foo.bar.rightFunctor.' CALL 'public final fun rightMap (b: foo.bar.BiFunctor, : kotlin.Any?, g: kotlin.Function1): kotlin.Any? declared in foo.bar' type=kotlin.Any? origin=null TYPE_ARG A: A of foo.bar.rightFunctor @@ -2397,7 +2221,7 @@ FILE fqName:foo.bar fileName:/variance.kt TYPE_ARG B: B of foo.bar.rightMap TYPE_ARG D: D of foo.bar.rightMap ARG (index:0): GET_VAR '$this$with: foo.bar.BiFunctor declared in foo.bar.rightMap.' type=foo.bar.BiFunctor origin=IMPLICIT_ARGUMENT - ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.rightMap' type=kotlin.Any? origin=IMPLICIT_ARGUMENT + ARG (index:1): GET_VAR ': kotlin.Any? declared in foo.bar.rightMap' type=kotlin.Any? origin=null ARG g: GET_VAR 'g: kotlin.Function1 declared in foo.bar.rightMap' type=kotlin.Function1 origin=null FUN name:vertical visibility:public modality:FINAL returnType:foo.bar.NT [infix] TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?] reified:false diff --git a/compiler-plugin/testData/box/variance.fir.txt b/compiler-plugin/testData/box/variance.fir.txt index bc0bd2b..df02209 100644 --- a/compiler-plugin/testData/box/variance.fir.txt +++ b/compiler-plugin/testData/box/variance.fir.txt @@ -44,13 +44,11 @@ FILE: variance.kt super() } - public open override fun pure(a: R|A|): R|{io/github/kyay10/highkt/Out, A>=} io/github/kyay10/highkt/K, out A>| { + public open override fun pure(a: R|A|): R|kotlin/collections/List| { ^pure R|kotlin/collections/listOf|(R|/a|) } - public open override fun R|{io/github/kyay10/highkt/Out, A>=} io/github/kyay10/highkt/K, out A>|.bind(f: R|(A) -> {io/github/kyay10/highkt/Out, B>=} io/github/kyay10/highkt/K, out B>|): R|{io/github/kyay10/highkt/Out, B>=} io/github/kyay10/highkt/K, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| kotlin/collections/List|, R|io/github/kyay10/highkt/K, A>, kotlin/collections/List>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out A>|>(this@R|foo/bar/ListMonad.bind|) + public open override fun R|kotlin/collections/List|.bind(f: R|(A) -> kotlin/collections/List|): R|kotlin/collections/List| { ^bind this@R|foo/bar/ListMonad.bind|.R|kotlin/collections/flatMap|(R|/f|) } @@ -60,18 +58,10 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Bi, L, A>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, L>=} io/github/kyay10/highkt/K, out L>, out A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/Bi, L, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, L>=} io/github/kyay10/highkt/K, out L>, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out L>, out A>|>(this@R|foo/bar/PairFunctor.fmap|) - lval : R|{io/github/kyay10/highkt/Bi, L, A>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, L>=} io/github/kyay10/highkt/K, out L>, out A>| = this@R|foo/bar/PairFunctor.fmap| + public open override fun R|kotlin/Pair|.fmap(f: R|(A) -> B|): R|kotlin/Pair| { + lval : R|kotlin/Pair| = this@R|foo/bar/PairFunctor.fmap| lval l: R|L| = R|/|.R|SubstitutionOverride|() - { - } - lval a: R|A| = R|/|.R|SubstitutionOverride|() - { - } - ^fmap R|/l|.R|kotlin/to|(R|/f|.R|SubstitutionOverride|(R|/a|)) } @@ -97,10 +87,8 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Out<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, F>=} io/github/kyay10/highkt/K, out F>, out G>, A>=} io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, F>=} io/github/kyay10/highkt/K, out F>, out G>, out A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/Out<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, F>=} io/github/kyay10/highkt/K, out F>, out G>, B>=} io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, F>=} io/github/kyay10/highkt/K, out F>, out G>, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out F>, out G>, out A>|>(this@R|foo/bar/.fmap|) - ^fmap R|kotlin/context||, R|foo/bar/Functor|, R|{io/github/kyay10/highkt/Out<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, F>=} io/github/kyay10/highkt/K, out F>, out G>, B>=} io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, F>=} io/github/kyay10/highkt/K, out F>, out G>, out B>|>(R|/ff|, R|/gg|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|{io/github/kyay10/highkt/Out<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, F>=} io/github/kyay10/highkt/K, out F>, out G>, B>=} io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, F>=} io/github/kyay10/highkt/K, out F>, out G>, out B>| { + public open override fun R|foo/bar/Composed|.fmap(f: R|(A) -> B|): R|foo/bar/Composed| { + ^fmap R|kotlin/context||, R|foo/bar/Functor|, R|foo/bar/Composed|>(R|/ff|, R|/gg|, = context(: R|foo/bar/Functor|, : R|foo/bar/Functor|) context@fun (): R|foo/bar/Composed| { ^ R|foo/bar/Composed.Composed|(context(R|/|) this@R|foo/bar/.fmap|.R|SubstitutionOverride=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>|>|.R|foo/bar/fmap|=} io/github/kyay10/highkt/K|, R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|>( = fmap@fun (it: R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|): R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K| { ^ context(R|/|) R|/it|.R|foo/bar/fmap|(R|/f|) } @@ -152,8 +140,6 @@ FILE: variance.kt } public final infix fun R|(A) -> B|.compose(g: R|(B) -> C|): R|(A) -> C| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(this@R|foo/bar/compose|) ^compose fun (a: R|A|): R|C| { ^ R|/g|.R|SubstitutionOverride|(this@R|foo/bar/compose|.R|SubstitutionOverride|(R|/a|)) } @@ -164,24 +150,20 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Pro, R, A>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/In, R>=} io/github/kyay10/highkt/K, in R>, out A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/Pro, R, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/In, R>=} io/github/kyay10/highkt/K, in R>, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, in R>, out A>|>(this@R|foo/bar/ReaderMonad.fmap|) - ^fmap R|foo/bar/Reader.Reader|(this@R|foo/bar/ReaderMonad.fmap|.R|SubstitutionOverride A|>|.R|foo/bar/compose|(R|/f|)) + public open override fun R|foo/bar/Reader|.fmap(f: R|(A) -> B|): R|foo/bar/Reader| { + ^fmap R|foo/bar/Reader.Reader|(this@R|foo/bar/ReaderMonad.fmap|.R|SubstitutionOverride A|>|.R|foo/bar/compose|(R|/f|)) } - public open override fun pure(a: R|A|): R|{io/github/kyay10/highkt/Pro, R, A>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/In, R>=} io/github/kyay10/highkt/K, in R>, out A>| { + public open override fun pure(a: R|A|): R|foo/bar/Reader| { ^pure R|foo/bar/Reader.Reader|( = Reader@fun (: R|R|): R|A| { ^ R|/a| } ) } - public open override fun R|{io/github/kyay10/highkt/Pro, R, A>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/In, R>=} io/github/kyay10/highkt/K, in R>, out A>|.bind(f: R|(A) -> {io/github/kyay10/highkt/Pro, R, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/In, R>=} io/github/kyay10/highkt/K, in R>, out B>|): R|{io/github/kyay10/highkt/Pro, R, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/In, R>=} io/github/kyay10/highkt/K, in R>, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| foo/bar/Reader|, R|io/github/kyay10/highkt/K, A>, foo/bar/Reader>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, in R>, out A>|>(this@R|foo/bar/ReaderMonad.bind|) + public open override fun R|foo/bar/Reader|.bind(f: R|(A) -> foo/bar/Reader|): R|foo/bar/Reader| { ^bind R|foo/bar/Reader.Reader|( = Reader@fun (r: R|R|): R|B| { - ^ R|/f|.R|kotlin/Function1.invoke|(this@R|foo/bar/ReaderMonad.bind|.R|SubstitutionOverride A|>|.R|SubstitutionOverride|(R|/r|)).R|SubstitutionOverride B|>|.R|SubstitutionOverride|(R|/r|) + ^ R|/f|.R|SubstitutionOverride|>|(this@R|foo/bar/ReaderMonad.bind|.R|SubstitutionOverride A|>|.R|SubstitutionOverride|(R|/r|)).R|SubstitutionOverride B|>|.R|SubstitutionOverride|(R|/r|) } ) } @@ -192,9 +174,7 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Bi, C, A>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, C>=} io/github/kyay10/highkt/K, out C>, out A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/Bi, C, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, C>=} io/github/kyay10/highkt/K, out C>, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out C>, out A>|>(this@R|foo/bar/ConstFunctor.fmap|) + public open override fun R|foo/bar/Const|.fmap(f: R|(A) -> B|): R|foo/bar/Const| { ^fmap R|foo/bar/Const.Const|(this@R|foo/bar/ConstFunctor.fmap|.R|SubstitutionOverride|) } @@ -204,13 +184,11 @@ FILE: variance.kt super() } - public open override fun pure(a: R|A|): R|{io/github/kyay10/highkt/Bi, kotlin/Unit, A>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out A>| { + public open override fun pure(a: R|A|): R|foo/bar/Const| { ^pure R|foo/bar/Const.Const|(Q|kotlin/Unit|) } - public open override fun R|{io/github/kyay10/highkt/Bi, kotlin/Unit, A>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out A>|.bind(f: R|(A) -> {io/github/kyay10/highkt/Bi, kotlin/Unit, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out B>|): R|{io/github/kyay10/highkt/Bi, kotlin/Unit, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType| foo/bar/Const|, R|io/github/kyay10/highkt/K, A>, foo/bar/Const>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out kotlin/Unit>, out A>|>(this@R|foo/bar/UnitMonad.bind|) + public open override fun R|foo/bar/Const|.bind(f: R|(A) -> foo/bar/Const|): R|foo/bar/Const| { ^bind R|foo/bar/Const.Const|(Q|kotlin/Unit|) } @@ -220,25 +198,17 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Out, A>=} io/github/kyay10/highkt/K, out A>|.fmap(f: R|(A) -> B|): R|{io/github/kyay10/highkt/Out, B>=} io/github/kyay10/highkt/K, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, B>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out A>|>(this@R|foo/bar/IdentityFunctor.fmap|) + public open override fun R|foo/bar/Identity|.fmap(f: R|(A) -> B|): R|foo/bar/Identity| { ^fmap R|foo/bar/Identity.Identity|(R|/f|.R|SubstitutionOverride|(this@R|foo/bar/IdentityFunctor.fmap|.R|SubstitutionOverride|)) } } public abstract interface BiFunctor : R|kotlin/Any| { public open fun R|{io/github/kyay10/highkt/Bi=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/Bi=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) ^bimap (this@R|foo/bar/BiFunctor|, (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.bimap|).R|foo/bar/BiFunctor.leftMap|(R|/f|)).R|foo/bar/BiFunctor.rightMap|(R|/g|) } public open fun R|{io/github/kyay10/highkt/Bi=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out B>|.leftMap(f: R|(A) -> C|): R|{io/github/kyay10/highkt/Bi=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out B>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) ^leftMap (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.leftMap|).R|foo/bar/BiFunctor.bimap|(R|/f|, = bimap@fun (it: R|B|): R|B| { ^ R|/it| } @@ -246,8 +216,6 @@ FILE: variance.kt } public open fun R|{io/github/kyay10/highkt/Bi=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out B>|.rightMap(g: R|(B) -> D|): R|{io/github/kyay10/highkt/Bi=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) ^rightMap (this@R|foo/bar/BiFunctor|, this@R|foo/bar/BiFunctor.rightMap|).R|foo/bar/BiFunctor.bimap|(bimap@fun (it: R|A|): R|A| { ^ R|/it| } @@ -284,7 +252,6 @@ FILE: variance.kt } public open override fun R|{io/github/kyay10/highkt/Bi=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out B>|.fmap(f: R|(B) -> C|): R|{io/github/kyay10/highkt/Bi=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out C>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/f|) ^fmap context(R|/|) this@R|foo/bar/.fmap|.R|foo/bar/rightMap|(R|/f|) } @@ -312,9 +279,7 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Bi<{foo/bar/Swap=} io/github/kyay10/highkt/K, out F>, A, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{foo/bar/Swap=} io/github/kyay10/highkt/K, out F>, A>=} io/github/kyay10/highkt/K<{foo/bar/Swap=} io/github/kyay10/highkt/K, out F>, out A>, out B>|.fmap(f: R|(B) -> C|): R|{io/github/kyay10/highkt/Bi<{foo/bar/Swap=} io/github/kyay10/highkt/K, out F>, A, C>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{foo/bar/Swap=} io/github/kyay10/highkt/K, out F>, A>=} io/github/kyay10/highkt/K<{foo/bar/Swap=} io/github/kyay10/highkt/K, out F>, out A>, out C>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out F>, out A>, out B>|>(this@R|foo/bar/.fmap|) + public open override fun R|foo/bar/Swapped|.fmap(f: R|(B) -> C|): R|foo/bar/Swapped| { ^fmap context(R|/|) this@R|foo/bar/.fmap|.R|SubstitutionOverride=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out A>|>|.R|foo/bar/leftMap|(R|/f|).R|kotlin/let|=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K, out A>|, R|foo/bar/Swapped|>(::R|foo/bar/Swapped.Swapped|) } @@ -364,11 +329,8 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Bi, A, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, A>=} io/github/kyay10/highkt/K, out A>, out B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/Bi, C, D>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, C>=} io/github/kyay10/highkt/K, out C>, out D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out A>, out B>|>(this@R|foo/bar/EitherBiFunctor.bimap|) - ^bimap when (lval : R|{io/github/kyay10/highkt/Bi, A, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, A>=} io/github/kyay10/highkt/K, out A>, out B>| = this@R|foo/bar/EitherBiFunctor.bimap|) { + public open override fun R|foo/bar/Either|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|foo/bar/Either| { + ^bimap when (lval : R|foo/bar/Either| = this@R|foo/bar/EitherBiFunctor.bimap|) { ($subj$ is R|foo/bar/Left|) -> { R|/f|.R|SubstitutionOverride|(this@R|foo/bar/EitherBiFunctor.bimap|.R|SubstitutionOverride|).R|foo/bar/left|() } @@ -385,19 +347,10 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Bi, A, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, A>=} io/github/kyay10/highkt/K, out A>, out B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/Bi, C, D>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, C>=} io/github/kyay10/highkt/K, out C>, out D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out A>, out B>|>(this@R|foo/bar/PairBiFunctor.bimap|) - lval : R|{io/github/kyay10/highkt/Bi, A, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, A>=} io/github/kyay10/highkt/K, out A>, out B>| = this@R|foo/bar/PairBiFunctor.bimap| + public open override fun R|kotlin/Pair|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|kotlin/Pair| { + lval : R|kotlin/Pair| = this@R|foo/bar/PairBiFunctor.bimap| lval a: R|A| = R|/|.R|SubstitutionOverride|() - { - } - lval b: R|B| = R|/|.R|SubstitutionOverride|() - { - } - ^bimap R|/f|.R|SubstitutionOverride|(R|/a|).R|kotlin/to|(R|/g|.R|SubstitutionOverride|(R|/b|)) } @@ -423,10 +376,7 @@ FILE: variance.kt super() } - public open override fun R|{io/github/kyay10/highkt/Bi<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, F>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, out F>, out G>, A, B>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, F>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, out F>, out G>, A>=} io/github/kyay10/highkt/K<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, F>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, out F>, out G>, out A>, out B>|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|{io/github/kyay10/highkt/Bi<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, F>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, out F>, out G>, C, D>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, F>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, out F>, out G>, C>=} io/github/kyay10/highkt/K<{foo/bar/BiCompose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, F>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, BF>=} io/github/kyay10/highkt/K, out BF>, out F>, out G>, out C>, out D>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>, C>|>(R|/f|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, B>, D>|>(R|/g|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out BF>, out F>, out G>, out A>, out B>|>(this@R|foo/bar/.bimap|) + public open override fun R|foo/bar/BiComposed|.bimap(f: R|(A) -> C|, g: R|(B) -> D|): R|foo/bar/BiComposed| { ^bimap context(R|/|) this@R|foo/bar/.bimap|.R|SubstitutionOverride=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>, out {io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K>|>|.R|foo/bar/bimap|=} io/github/kyay10/highkt/K|, R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|, R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|, R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|, R|BF|>(bimap@fun (it: R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|): R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K| { ^ context(R|/|) R|/it|.R|foo/bar/fmap|(R|/f|) } @@ -473,8 +423,7 @@ FILE: variance.kt super() } - public open override operator fun invoke(fa: R|{io/github/kyay10/highkt/Out<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, I>=} io/github/kyay10/highkt/K, out I>, out F>, A>=} io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, I>=} io/github/kyay10/highkt/K, out I>, out F>, out A>|): R|{io/github/kyay10/highkt/Out<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, J>=} io/github/kyay10/highkt/K, out J>, out G>, A>=} io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, J>=} io/github/kyay10/highkt/K, out J>, out G>, out A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out I>, out F>, out A>|>(R|/fa|) + public open override operator fun invoke(fa: R|foo/bar/Composed|): R|foo/bar/Composed| { ^invoke R|/other|.R|SubstitutionOverride=} io/github/kyay10/highkt/K|>||>(context(R|/|) R|/fa|.R|SubstitutionOverride=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>|>|.R|foo/bar/fmap|=} io/github/kyay10/highkt/K|, R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|>( = fmap@fun (it: R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|): R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K| { ^ this@R|foo/bar/horizontalLeft|.R|SubstitutionOverride=} io/github/kyay10/highkt/K|>|(R|/it|) } @@ -491,8 +440,7 @@ FILE: variance.kt super() } - public open override operator fun invoke(fa: R|{io/github/kyay10/highkt/Out<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, I>=} io/github/kyay10/highkt/K, out I>, out F>, A>=} io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, I>=} io/github/kyay10/highkt/K, out I>, out F>, out A>|): R|{io/github/kyay10/highkt/Out<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, J>=} io/github/kyay10/highkt/K, out J>, out G>, A>=} io/github/kyay10/highkt/K<{foo/bar/Compose=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, J>=} io/github/kyay10/highkt/K, out J>, out G>, out A>| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType||, R|io/github/kyay10/highkt/K, out I>, out F>, out A>|>(R|/fa|) + public open override operator fun invoke(fa: R|foo/bar/Composed|): R|foo/bar/Composed| { ^invoke context(R|/|) R|/other|.R|SubstitutionOverride=} io/github/kyay10/highkt/K|>|=} io/github/kyay10/highkt/K|>(R|/fa|.R|SubstitutionOverride=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K=} io/github/kyay10/highkt/K>|>|).R|foo/bar/fmap|=} io/github/kyay10/highkt/K|, R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|>( = fmap@fun (it: R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K|): R|{io/github/kyay10/highkt/Out=} io/github/kyay10/highkt/K| { ^ this@R|foo/bar/horizontalRight|.R|SubstitutionOverride=} io/github/kyay10/highkt/K|>|(R|/it|) } @@ -508,7 +456,6 @@ FILE: variance.kt ^ (R|/it|, String(!)) } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/String>|>(R|/result|) when () { !=(R|/result|, R|kotlin/collections/listOf|(vararg(String(Hello!), String(World!)))) -> { R|kotlin/error|((R|/result|)) @@ -524,7 +471,6 @@ FILE: variance.kt ^ (R|/it|, String(!)) } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Int>, kotlin/String>|>(R|/result|) when () { !=(R|/result|, Int(1).R|kotlin/to|(String(Hello!))) -> { R|kotlin/error|((R|/result|)) @@ -536,15 +482,12 @@ FILE: variance.kt } private final fun maybeExample(): R|kotlin/Unit| { ^maybeExample R|kotlin/with|, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>>, out kotlin/Unit>>|, R|kotlin/Unit|>(R|foo/bar/maybeFunctor|, = with@fun R|foo/bar/Functor<{foo/bar/MaybeK=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>>, out kotlin/Unit>>|.(): R|kotlin/Unit| { - lval a: R|{foo/bar/Maybe=} foo/bar/BiComposed, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/Int>| = R|foo/bar/BiComposed.BiComposed|(R|foo/bar/Identity.Identity|(Int(10)).R|foo/bar/right||>().R|io/github/kyay10/highkt/expandTo|, {io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out kotlin/Unit>, {io/github/kyay10/highkt/Out, kotlin/Int>=} io/github/kyay10/highkt/K, out kotlin/Int>>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, {io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out kotlin/Unit>>=} io/github/kyay10/highkt/K, out {io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out kotlin/Unit>>, out {io/github/kyay10/highkt/Out, kotlin/Int>=} io/github/kyay10/highkt/K, out kotlin/Int>>|>()) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} foo/bar/BiComposed<*, *, *, *, *>, foo/bar/Either<*, *>>, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>>, foo/bar/Identity<*>>, kotlin/Unit>, kotlin/Int>|>(R|/a|) + lval a: R|{foo/bar/Maybe=} foo/bar/BiComposed, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/Int>| = R|foo/bar/BiComposed.BiComposed|(R|foo/bar/Identity.Identity|(Int(10)).R|foo/bar/right||>()) lval b: R|{foo/bar/Maybe=} foo/bar/BiComposed, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/String>| = (this@R|special/anonymous|, R|/a|).R|SubstitutionOverride, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>>, out kotlin/Unit>, B>=} io/github/kyay10/highkt/K<{foo/bar/MaybeK=} io/github/kyay10/highkt/K, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>>, out kotlin/Unit>, out B>|>|( = fmap@fun (it: R|kotlin/Int|): R|kotlin/String| { ^ R|/it|.R|kotlin/Int.toString|() } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} foo/bar/BiComposed<*, *, *, *, *>, foo/bar/Either<*, *>>, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>>, foo/bar/Identity<*>>, kotlin/Unit>, kotlin/String>|>(R|/b|) - lval expected: R|{foo/bar/Maybe=} foo/bar/BiComposed, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/String>| = R|foo/bar/BiComposed.BiComposed|(R|foo/bar/Identity.Identity|(String(10)).R|foo/bar/right||>().R|io/github/kyay10/highkt/expandTo|, {io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out kotlin/Unit>, {io/github/kyay10/highkt/Out, kotlin/String>=} io/github/kyay10/highkt/K, out kotlin/String>>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, {io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out kotlin/Unit>>=} io/github/kyay10/highkt/K, out {io/github/kyay10/highkt/Out<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, out kotlin/Unit>>, out {io/github/kyay10/highkt/Out, kotlin/String>=} io/github/kyay10/highkt/K, out kotlin/String>>|>()) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|=} foo/bar/BiComposed<*, *, *, *, *>, foo/bar/Either<*, *>>, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>>, foo/bar/Identity<*>>, kotlin/Unit>, kotlin/String>|>(R|/expected|) + lval expected: R|{foo/bar/Maybe=} foo/bar/BiComposed, {io/github/kyay10/highkt/Out, kotlin/Unit>=} io/github/kyay10/highkt/K, out kotlin/Unit>, foo/bar/Identity<*>, kotlin/Unit, kotlin/String>| = R|foo/bar/BiComposed.BiComposed|(R|foo/bar/Identity.Identity|(String(10)).R|foo/bar/right||>()) when () { !=(R|/b|, R|/expected|) -> { R|kotlin/error|((R|/b|)) diff --git a/compiler-plugin/testData/box/variance.kt b/compiler-plugin/testData/box/variance.kt index 4884abe..6ec1a64 100644 --- a/compiler-plugin/testData/box/variance.kt +++ b/compiler-plugin/testData/box/variance.kt @@ -17,22 +17,22 @@ interface Monad : Functor { } context(functor: Functor) -fun Out.fmap(f: (A) -> B) = with(functor) { fmap(f) } +fun Out.fmap(f: (A) -> B) = with(functor) { this@fmap.fmap(f) } context(monad: Monad) fun pure(a: A) = with(monad) { pure(a) } context(monad: Monad) -fun Out.bind(f: (A) -> Out) = with(monad) { bind(f) } +fun Out.bind(f: (A) -> Out) = with(monad) { this@bind.bind(f) } object ListMonad : Monad> { - override fun pure(a: A): Out, A> = listOf(a) + override fun pure(a: A) = listOf(a) - override fun Out, A>.bind(f: (A) -> Out, B>): Out, B> = flatMap(f) + override fun List.bind(f: (A) -> List) = flatMap(f) } class PairFunctor : Functor, L>> { - override fun Bi, L, A>.fmap(f: (A) -> B): Bi, L, B> { + override fun Pair.fmap(f: (A) -> B): Pair { val (l, a) = this return l to f(a) } @@ -43,7 +43,7 @@ typealias Compose = Bi, F, G> context(ff: Functor, gg: Functor) fun composeFunctors() = object : Functor> { - override fun Out, A>.fmap(f: (A) -> B): Out, B> = context(ff, gg) { // KT-81441 + override fun Composed.fmap(f: (A) -> B) = context(ff, gg) { // KT-81441 Composed(value.fmap { it.fmap(f) }) } } @@ -54,29 +54,27 @@ data class Const(val value: C) data class Identity(val value: A) -infix fun ((A) -> B).compose(g: (B) -> C): (A) -> C = { a: A -> g(this(a)) } +infix fun ((A) -> B).compose(g: (B) -> C) = { a: A -> g(this(a)) } class ReaderMonad : Monad, R>> { - override fun Pro, R, A>.fmap(f: (A) -> B): Pro, R, B> = Reader(run compose f) + override fun Reader.fmap(f: (A) -> B) = Reader(run compose f) - override fun pure(a: A): Pro, R, A> = Reader { _: R -> a } - override fun Pro, R, A>.bind(f: (A) -> Pro, R, B>): Pro, R, B> = - Reader { r: R -> f(run(r)).run(r) } + override fun pure(a: A) = Reader { _: R -> a } + override fun Reader.bind(f: (A) -> Reader) = Reader { r: R -> f(run(r)).run(r) } } class ConstFunctor : Functor, C>> { - override fun Bi, C, A>.fmap(f: (A) -> B): Bi, C, B> = Const<_, B>(value) + override fun Const.fmap(f: (A) -> B) = Const<_, B>(value) } object UnitMonad : Monad, Unit>> { - override fun pure(a: A): Bi, Unit, A> = Const<_, A>(Unit) + override fun pure(a: A) = Const<_, A>(Unit) - override fun Bi, Unit, A>.bind(f: (A) -> Bi, Unit, B>): Bi, Unit, B> = - Const<_, B>(Unit) + override fun Const.bind(f: (A) -> Const) = Const<_, B>(Unit) } object IdentityFunctor : Functor> { - override fun Out, A>.fmap(f: (A) -> B): Out, B> = Identity(f(value)) + override fun Identity.fmap(f: (A) -> B) = Identity(f(value)) } interface BiFunctor { @@ -86,17 +84,17 @@ interface BiFunctor { } context(b: BiFunctor) -fun Bi.bimap(f: (A) -> C, g: (B) -> D) = with(b) { bimap(f, g) } +fun Bi.bimap(f: (A) -> C, g: (B) -> D) = with(b) { this@bimap.bimap(f, g) } context(b: BiFunctor) -fun Bi.leftMap(f: (A) -> C) = with(b) { leftMap(f) } +fun Bi.leftMap(f: (A) -> C) = with(b) { this@leftMap.leftMap(f) } context(b: BiFunctor) -fun Bi.rightMap(g: (B) -> D) = with(b) { rightMap(g) } +fun Bi.rightMap(g: (B) -> D) = with(b) { this@rightMap.rightMap(g) } context(_: BiFunctor) fun rightFunctor() = object : Functor> { - override fun Bi.fmap(f: (B) -> C): Bi = rightMap(f) + override fun Bi.fmap(f: (B) -> C) = rightMap(f) } data class Swapped(val value: Bi) @@ -104,7 +102,7 @@ typealias Swap = Out, F> context(_: BiFunctor) fun leftFunctor() = object : Functor, A>> { - override fun Bi, A, B>.fmap(f: (B) -> C): Bi, A, C> = value.leftMap(f).let(::Swapped) + override fun Swapped.fmap(f: (B) -> C) = value.leftMap(f).let(::Swapped) } sealed class Either @@ -115,15 +113,14 @@ fun A.right(): Either = Right(this) fun A.left(): Either = Left(this) object EitherBiFunctor : BiFunctor> { - override fun Bi, A, B>.bimap(f: (A) -> C, g: (B) -> D): Bi, C, D> = - when (this) { - is Left -> f(value).left() - is Right -> g(value).right() - } + override fun Either.bimap(f: (A) -> C, g: (B) -> D) = when (this) { + is Left -> f(value).left() + is Right -> g(value).right() + } } object PairBiFunctor : BiFunctor> { - override fun Bi, A, B>.bimap(f: (A) -> C, g: (B) -> D): Bi, C, D> { + override fun Pair.bimap(f: (A) -> C, g: (B) -> D): Pair { val (a, b) = this return f(a) to g(b) } @@ -134,10 +131,10 @@ typealias BiCompose = Bi, BI>, F, G> context(_: BiFunctor, _: Functor, _: Functor) fun composeBiFunctors() = object : BiFunctor> { - override fun Bi, A, B>.bimap( + override fun BiComposed.bimap( f: (A) -> C, g: (B) -> D - ): Bi, C, D> = value.bimap({ it.fmap(f) }) { it.fmap(g) }.let(::BiComposed) + ) = value.bimap({ it.fmap(f) }) { it.fmap(g) }.let(::BiComposed) } typealias Maybe = BiComposed, Out, Unit>, Identity<*>, Unit, A> @@ -154,19 +151,18 @@ interface NT { } infix fun NT.vertical(other: NT) = object : NT { - override fun invoke(fa: Out): Out = other(this@vertical(fa)) + override fun invoke(fa: Out) = other(this@vertical(fa)) } context(_: Functor) infix fun NT.horizontalLeft(other: NT) = object : NT, Compose> { - override operator fun invoke(fa: Out, A>): Out, A> { - return other(fa.value.fmap { this@horizontalLeft(it) }).let(::Composed) - } + override operator fun invoke(fa: Composed) = + other(fa.value.fmap { this@horizontalLeft(it) }).let(::Composed) } context(_: Functor) infix fun NT.horizontalRight(other: NT) = object : NT, Compose> { - override fun invoke(fa: Out, A>): Out, A> = + override fun invoke(fa: Composed) = other(fa.value).fmap { this@horizontalRight(it) }.let(::Composed) } @@ -183,9 +179,9 @@ private fun pairExample() = context(PairFunctor()) { } private fun maybeExample() = with(maybeFunctor) { - val a = Maybe(Identity(10).right().expandTo()) + val a = Maybe(Identity(10).right()) val b: Maybe = a.fmap { it.toString() } - val expected = Maybe(Identity("10").right().expandTo()) + val expected = Maybe(Identity("10").right()) if (b != expected) error("$b") } diff --git a/compiler-plugin/testData/diagnostics/expandTo_mismatch.fir.txt b/compiler-plugin/testData/diagnostics/expandTo_mismatch.fir.txt index b4806e6..da845b9 100644 --- a/compiler-plugin/testData/diagnostics/expandTo_mismatch.fir.txt +++ b/compiler-plugin/testData/diagnostics/expandTo_mismatch.fir.txt @@ -4,8 +4,7 @@ FILE: expandTo_mismatch.kt public final typealias Swap = R|io/github/kyay10/highkt/K, F>| public final fun test(): R|kotlin/Unit| { lval foo: R|kotlin/Pair| = Int(1).R|kotlin/to|(String(Hello)) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Int>, kotlin/String>|>(R|/foo|) R|/foo|.R|io/github/kyay10/highkt/expandTo|, kotlin/Int, kotlin/String>=} io/github/kyay10/highkt/K, kotlin/Int>, kotlin/String>|>() R|/foo|.R|io/github/kyay10/highkt/expandTo|>=} io/github/kyay10/highkt/K, kotlin/Pair<*, *>>, kotlin/String, kotlin/Int>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, kotlin/Pair<*, *>>, kotlin/String>, kotlin/Int>|>() - R|/foo|.R|io/github/kyay10/highkt/expandTo|>=} io/github/kyay10/highkt/K, kotlin/Pair<*, *>>, kotlin/Int, kotlin/String>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, kotlin/Pair<*, *>>, kotlin/Int>, kotlin/String>|>() + R|/foo|.R|io/github/kyay10/highkt/expandTo#|>=} io/github/kyay10/highkt/K, kotlin/Pair<*, *>>, kotlin/Int, kotlin/String>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, kotlin/Pair<*, *>>, kotlin/Int>, kotlin/String>|>() } diff --git a/compiler-plugin/testData/diagnostics/expandTo_mismatch.kt b/compiler-plugin/testData/diagnostics/expandTo_mismatch.kt index 93280f0..1c097ff 100644 --- a/compiler-plugin/testData/diagnostics/expandTo_mismatch.kt +++ b/compiler-plugin/testData/diagnostics/expandTo_mismatch.kt @@ -13,7 +13,7 @@ fun test() { val foo = 1 to "Hello" foo.expandTo, Int, String>>() // OK foo.expandTo>, String, Int>>() // OK - foo.expandTo>, Int, String>>() // Error + foo.expandTo>, Int, String>>() // Error } /* GENERATED_FIR_TAGS: classDeclaration, data, functionDeclaration, integerLiteral, interfaceDeclaration, diff --git a/compiler-plugin/testData/diagnostics/handles_contexts.fir.txt b/compiler-plugin/testData/diagnostics/handles_contexts.fir.txt index 469aadc..ef83d7c 100644 --- a/compiler-plugin/testData/diagnostics/handles_contexts.fir.txt +++ b/compiler-plugin/testData/diagnostics/handles_contexts.fir.txt @@ -27,6 +27,5 @@ FILE: handles_contexts.kt } context(: R|Amb|, : R|Exc|) public final suspend fun R|Stream?|.reflect(): R|A| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, A>?|>(this@R|/reflect|) ^reflect context(R|/|, R|/|) this@R|/reflect| ?: context(R|/|) R|/raise|().R|/reflect|() } diff --git a/compiler-plugin/testData/diagnostics/handles_contracts.fir.txt b/compiler-plugin/testData/diagnostics/handles_contracts.fir.txt index 88e488e..8e9b4f6 100644 --- a/compiler-plugin/testData/diagnostics/handles_contracts.fir.txt +++ b/compiler-plugin/testData/diagnostics/handles_contracts.fir.txt @@ -12,5 +12,4 @@ FILE: handles_contracts.kt ) } - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Any?>?|>(this@R|/hasContract|) } diff --git a/compiler-plugin/testData/diagnostics/handles_deconstruction.fir.txt b/compiler-plugin/testData/diagnostics/handles_deconstruction.fir.txt index 3fcf941..474d668 100644 --- a/compiler-plugin/testData/diagnostics/handles_deconstruction.fir.txt +++ b/compiler-plugin/testData/diagnostics/handles_deconstruction.fir.txt @@ -12,8 +12,6 @@ FILE: handles_deconstruction.kt } public final fun R|Handler|.useWithFinal(body: R|(kotlin/Pair, SubCont>) -> E|): R|A| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Pair, SubCont>>, E>|>(R|/body|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, E>|>(this@R|/useWithFinal|) R|kotlin/TODO|() } public final class Scheduler2 : R|Handler| { @@ -24,9 +22,7 @@ FILE: handles_deconstruction.kt public final suspend fun yieldAndRepush(): R|kotlin/Unit| { ^yieldAndRepush this@R|/Scheduler2|.R|/useWithFinal|( = useWithFinal@fun (: R|kotlin/Pair, SubCont>|): R|kotlin/Unit| { lval a: R|SubCont| = R|/|.R|SubstitutionOverride|>|() - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Unit>, kotlin/Unit>|>(R|/a|) lval b: R|SubCont| = R|/|.R|SubstitutionOverride|>|() - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Unit>, kotlin/Unit>|>(R|/b|) { R|/b|.R|SubstitutionOverride|(Q|kotlin/Unit|) } diff --git a/compiler-plugin/testData/diagnostics/handles_is_checks.fir.txt b/compiler-plugin/testData/diagnostics/handles_is_checks.fir.txt index 5317140..455e7ca 100644 --- a/compiler-plugin/testData/diagnostics/handles_is_checks.fir.txt +++ b/compiler-plugin/testData/diagnostics/handles_is_checks.fir.txt @@ -54,7 +54,6 @@ FILE: handles_is_checks.kt } lval bar: R|Either| = Int(42).R|/right|() - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Nothing>, kotlin/Int>|>(R|/bar|) when (lval : R|Either| = R|/bar|) { ($subj$ is R|Either.Left|) -> { } diff --git a/compiler-plugin/testData/diagnostics/handles_is_checks_with_invoke.fir.txt b/compiler-plugin/testData/diagnostics/handles_is_checks_with_invoke.fir.txt index 951e16a..52304cc 100644 --- a/compiler-plugin/testData/diagnostics/handles_is_checks_with_invoke.fir.txt +++ b/compiler-plugin/testData/diagnostics/handles_is_checks_with_invoke.fir.txt @@ -58,7 +58,6 @@ FILE: handles_is_checks_with_invoke.kt } lval bar: R|Either| = Int(42).R|/right|.R|SubstitutionOverride|>|() - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Nothing>, kotlin/Int>|>(R|/bar|) when (lval : R|Either| = R|/bar|) { ($subj$ is R|Either.Left|) -> { } diff --git a/compiler-plugin/testData/diagnostics/handles_underscore_properties.fir.txt b/compiler-plugin/testData/diagnostics/handles_underscore_properties.fir.txt index 46e5974..648a3f6 100644 --- a/compiler-plugin/testData/diagnostics/handles_underscore_properties.fir.txt +++ b/compiler-plugin/testData/diagnostics/handles_underscore_properties.fir.txt @@ -3,5 +3,4 @@ FILE: handles_underscore_properties.kt lval : R|kotlin/Pair, kotlin/collections/List>| = R|kotlin/collections/listOf|(Int(42)).R|kotlin/to||, R|kotlin/collections/List|>(R|kotlin/collections/listOf|(String(foo))) lval : R|kotlin/collections/List| = R|/|.R|SubstitutionOverride|>|() lval b: R|kotlin/collections/List| = R|/|.R|SubstitutionOverride|>|() - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/String>|>(R|/b|) } diff --git a/compiler-plugin/testData/diagnostics/higher_order_type_function.fir.txt b/compiler-plugin/testData/diagnostics/higher_order_type_function.fir.txt index 3234f20..4c21f96 100644 --- a/compiler-plugin/testData/diagnostics/higher_order_type_function.fir.txt +++ b/compiler-plugin/testData/diagnostics/higher_order_type_function.fir.txt @@ -4,8 +4,7 @@ FILE: higher_order_type_function.kt public final typealias Swap = R|io/github/kyay10/highkt/K, F>| public final fun test(): R|kotlin/Unit| { lval foo: R|kotlin/Triple| = R|kotlin/Triple.Triple|(Int(1), String(Hello), Q|kotlin/Unit|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Int>, kotlin/String>, kotlin/Unit>|>(R|/foo|) R|/foo|.R|io/github/kyay10/highkt/expandTo|, kotlin/Int, kotlin/String, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2, kotlin/Int, kotlin/String>=} io/github/kyay10/highkt/K, kotlin/Int>, kotlin/String>, kotlin/Unit>|>() R|/foo|.R|io/github/kyay10/highkt/expandTo|>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/String, kotlin/Int, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2<{Swap>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/String, kotlin/Int>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/String>, kotlin/Int>, kotlin/Unit>|>() - R|/foo|.R|io/github/kyay10/highkt/expandTo|>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/Int, kotlin/String, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2<{Swap>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/Int, kotlin/String>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/Int>, kotlin/String>, kotlin/Unit>|>() + R|/foo|.R|io/github/kyay10/highkt/expandTo#|>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/Int, kotlin/String, kotlin/Unit>=} io/github/kyay10/highkt/K<{io/github/kyay10/highkt/K2<{Swap>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/Int, kotlin/String>=} io/github/kyay10/highkt/K>=} io/github/kyay10/highkt/K, kotlin/Triple<*, *, *>>, kotlin/Int>, kotlin/String>, kotlin/Unit>|>() } diff --git a/compiler-plugin/testData/diagnostics/higher_order_type_function.kt b/compiler-plugin/testData/diagnostics/higher_order_type_function.kt index 4877a69..c86bece 100644 --- a/compiler-plugin/testData/diagnostics/higher_order_type_function.kt +++ b/compiler-plugin/testData/diagnostics/higher_order_type_function.kt @@ -14,7 +14,7 @@ fun test() { val foo = Triple(1, "Hello", Unit) foo.expandTo, Int, String, Unit>>() // OK foo.expandTo>, String, Int, Unit>>() // OK - foo.expandTo>, Int, String, Unit>>() // Error + foo.expandTo>, Int, String, Unit>>() // Error } /* GENERATED_FIR_TAGS: classDeclaration, data, functionDeclaration, integerLiteral, interfaceDeclaration, diff --git a/compiler-plugin/testData/diagnostics/rejects_invariance.fir.txt b/compiler-plugin/testData/diagnostics/rejects_invariance.fir.txt index fa37ff0..9bd063b 100644 --- a/compiler-plugin/testData/diagnostics/rejects_invariance.fir.txt +++ b/compiler-plugin/testData/diagnostics/rejects_invariance.fir.txt @@ -10,16 +10,12 @@ FILE: rejects_invariance.kt } public final fun R|Functor>|.test(x: R|Invariant|): R|kotlin/Unit| { - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/Int>|>(R|/x|) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, Invariant<*>>|>(this@R|/test|) lval y: R|Invariant| = (this@R|/test|, R|/x|).R|SubstitutionOverride, B>=} io/github/kyay10/highkt/K, out B>|>|( = fmap@fun (it: R|kotlin/Int|): R|kotlin/String| { ^ R|/it|.R|kotlin/Int.toString|() } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, kotlin/String>|>(R|/y|) lval z: R|Invariant| = (this@R|/test|, R|/x|).R|SubstitutionOverride, B>=} io/github/kyay10/highkt/K, out B>|>|( = fmap@fun (it: R|kotlin/Int|): R|kotlin/String| { ^ R|/it|.R|kotlin/Int.toString|() } ) - Q|io/github/kyay10/highkt|.R|io/github/kyay10/highkt/assertIsType|, out kotlin/String>|>(R|/z|) } diff --git a/compiler-plugin/testData/diagnostics/rejects_invariance.kt b/compiler-plugin/testData/diagnostics/rejects_invariance.kt index d93dfd9..bf648de 100644 --- a/compiler-plugin/testData/diagnostics/rejects_invariance.kt +++ b/compiler-plugin/testData/diagnostics/rejects_invariance.kt @@ -9,7 +9,7 @@ interface Functor { class Invariant fun Functor>.test(x: Invariant) { - val y: Invariant = x.fmap { it.toString() } + val y: Invariant = x.fmap { it.toString() } val z: Invariant = x.fmap { it.toString() } } diff --git a/gradle-plugin/src/io/github/kyay10/highkt/HighKTGradlePlugin.kt b/gradle-plugin/src/io/github/kyay10/highkt/HighKTGradlePlugin.kt index efbbcf4..b0dcd37 100644 --- a/gradle-plugin/src/io/github/kyay10/highkt/HighKTGradlePlugin.kt +++ b/gradle-plugin/src/io/github/kyay10/highkt/HighKTGradlePlugin.kt @@ -28,20 +28,11 @@ class HighKTGradlePlugin : KotlinCompilerPluginSupportPlugin { kotlinCompilation: KotlinCompilation<*> ): Provider> { val project = kotlinCompilation.target.project - // KT-53477 workaround - project.configurations.matching { - it.name.startsWith("kotlin") && it.name.contains("CompilerPluginClasspath") - }.all { - it.isTransitive = true - } kotlinCompilation.dependencies { implementation(ANNOTATIONS_LIBRARY_COORDINATES) } if (kotlinCompilation.implementationConfigurationName == "metadataCompilationImplementation") { project.dependencies.add("commonMainImplementation", ANNOTATIONS_LIBRARY_COORDINATES) } - kotlinCompilation.compileTaskProvider.configure { - it.compilerOptions.freeCompilerArgs.add("-Xwarning-level=USELESS_IS_CHECK:disabled") - } return project.provider { emptyList() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 19e710c..2be3902 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin = "2.3.0-Beta1" +kotlin = "2.3.20-Beta1" buildconfig = "5.6.5" binary-compatibility-validator = "0.16.3" nexus-publish = "2.0.0" diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 0efdd3d..b692934 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -218,6 +218,11 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" @@ -288,10 +293,10 @@ minimatch@^9.0.4, minimatch@^9.0.5: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -mocha@11.7.2: - version "11.7.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-11.7.2.tgz#3c0079fe5cc2f8ea86d99124debcc42bb1ab22b5" - integrity sha512-lkqVJPmqqG/w5jmmFtiRvtA2jkDyNVUcefFJKb2uyX4dekk8Okgqop3cgbFiaIvj8uCRJVTP5x9dfxGyXm2jvQ== +mocha@11.7.5: + version "11.7.5" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-11.7.5.tgz#58f5bbfa5e0211ce7e5ee6128107cefc2515a627" + integrity sha512-mTT6RgopEYABzXWFx+GcJ+ZQ32kp4fMf0xvpZIIfSq9Z8lC/++MtcCnQ9t5FP2veYEP95FIYSvW+U9fV4xrlig== dependencies: browser-stdout "^1.3.1" chokidar "^4.0.1" @@ -301,6 +306,7 @@ mocha@11.7.2: find-up "^5.0.0" glob "^10.4.5" he "^1.2.0" + is-path-inside "^3.0.3" js-yaml "^4.1.0" log-symbols "^4.1.0" minimatch "^9.0.5" diff --git a/plugin-annotations/api/plugin-annotations.api b/plugin-annotations/api/plugin-annotations.api index fc9f73f..d1ec82f 100644 --- a/plugin-annotations/api/plugin-annotations.api +++ b/plugin-annotations/api/plugin-annotations.api @@ -5,7 +5,6 @@ public abstract interface class io/github/kyay10/highkt/K { } public final class io/github/kyay10/highkt/PreludeKt { - public static final fun assertIsType (Ljava/lang/Object;)V public static final fun expandTo (Ljava/lang/Object;)Ljava/lang/Object; } diff --git a/plugin-annotations/src/commonMain/kotlin/io/github/kyay10/highkt/prelude.kt b/plugin-annotations/src/commonMain/kotlin/io/github/kyay10/highkt/prelude.kt index 2e75ed2..160404f 100644 --- a/plugin-annotations/src/commonMain/kotlin/io/github/kyay10/highkt/prelude.kt +++ b/plugin-annotations/src/commonMain/kotlin/io/github/kyay10/highkt/prelude.kt @@ -4,9 +4,6 @@ package io.github.kyay10.highkt import kotlin.contracts.ExperimentalContracts -import kotlin.contracts.contract -import kotlin.js.JsName -import kotlin.jvm.JvmName @Target(AnnotationTarget.CLASS) public annotation class TypeFunction @@ -29,21 +26,4 @@ public typealias K2 = K, B> public typealias Tri = Out, C> public typealias K3 = K, C> -public inline fun assertIsType(x: Any?) { - contract { - returns() implies (x is T) - } -} - -@JvmName("assertIsType2") -@JsName("assertIsType2") -public inline fun assertIsType(x: Any?) { - contract { - returns() implies (x is T1 && x is T2) - } -} - -public inline fun Any?.expandTo(): T { - @Suppress("UNCHECKED_CAST") - return this as T -} \ No newline at end of file +public inline fun T.expandTo(): T = this \ No newline at end of file