java.lang.Object
java.lang.Record
org.aya.tyck.error.BadTypeError
- All Implemented Interfaces:
SourceNodeProblem,TyckError,Stateful,org.aya.util.reporter.Problem
public record BadTypeError(@NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull org.aya.syntax.core.term.Term actualType, @NotNull org.aya.pretty.doc.Doc action, @NotNull org.aya.pretty.doc.Doc thing, @NotNull org.aya.generic.AyaDocile desired, @NotNull TyckState state)
extends Record
implements TyckError, Stateful, SourceNodeProblem
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.util.reporter.Problem
org.aya.util.reporter.Problem.Severity, org.aya.util.reporter.Problem.Stage -
Field Summary
Fields inherited from interface org.aya.util.reporter.Problem
ERROR, NOTE -
Constructor Summary
ConstructorsConstructorDescriptionBadTypeError(@NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull org.aya.syntax.core.term.Term actualType, @NotNull org.aya.pretty.doc.Doc action, @NotNull org.aya.pretty.doc.Doc thing, @NotNull org.aya.generic.AyaDocile desired, @NotNull TyckState state) Creates an instance of aBadTypeErrorrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.aya.pretty.doc.Docaction()Returns the value of theactionrecord component.@NotNull org.aya.syntax.core.term.TermReturns the value of theactualTyperecord component.@NotNull org.aya.pretty.doc.Docdescribe(@NotNull org.aya.util.prettier.PrettierOptions options) @NotNull org.aya.generic.AyaDociledesired()Returns the value of thedesiredrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr()Returns the value of theexprrecord component.final inthashCode()Returns a hash code value for this object.@NotNull org.aya.pretty.doc.Dochint(@NotNull org.aya.util.prettier.PrettierOptions options) static @NotNull BadTypeErrorpi(@NotNull TyckState state, @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull org.aya.syntax.core.term.Term actualType) static @NotNull BadTypeErrorsigmaAcc(@NotNull TyckState state, @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, int ix, @NotNull org.aya.syntax.core.term.Term actualType) static @NotNull BadTypeErrorsigmaCon(@NotNull TyckState state, @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull org.aya.syntax.core.term.Term actualType) @NotNull TyckStatestate()Returns the value of thestaterecord component.static @NotNull BadTypeErrorstructAcc(@NotNull TyckState state, @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull String fieldName, @NotNull org.aya.syntax.core.term.Term actualType) static @NotNull BadTypeErrorstructCon(@NotNull TyckState state, @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull org.aya.syntax.core.term.Term actualType) @NotNull org.aya.pretty.doc.Docthing()Returns the value of thethingrecord component.final StringtoString()Returns a string representation of this record class.static @NotNull BadTypeErroruniv(@NotNull TyckState state, @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull org.aya.syntax.core.term.Term actual) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aya.util.reporter.Problem
brief, inlineHints, isError, toPrettyErrorMethods inherited from interface org.aya.tyck.error.SourceNodeProblem
sourcePosMethods inherited from interface org.aya.tyck.tycker.Stateful
freezeHoles, solve, whnf
-
Constructor Details
-
BadTypeError
public BadTypeError(@NotNull @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull @NotNull org.aya.syntax.core.term.Term actualType, @NotNull @NotNull org.aya.pretty.doc.Doc action, @NotNull @NotNull org.aya.pretty.doc.Doc thing, @NotNull @NotNull org.aya.generic.AyaDocile desired, @NotNull @NotNull TyckState state) Creates an instance of aBadTypeErrorrecord class.- Parameters:
expr- the value for theexprrecord componentactualType- the value for theactualTyperecord componentaction- the value for theactionrecord componentthing- the value for thethingrecord componentdesired- the value for thedesiredrecord componentstate- the value for thestaterecord component
-
-
Method Details
-
describe
@NotNull public @NotNull org.aya.pretty.doc.Doc describe(@NotNull @NotNull org.aya.util.prettier.PrettierOptions options) - Specified by:
describein interfaceorg.aya.util.reporter.Problem
-
hint
@NotNull public @NotNull org.aya.pretty.doc.Doc hint(@NotNull @NotNull org.aya.util.prettier.PrettierOptions options) - Specified by:
hintin interfaceorg.aya.util.reporter.Problem
-
pi
@NotNull public static @NotNull BadTypeError pi(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull @NotNull org.aya.syntax.core.term.Term actualType) -
sigmaAcc
@NotNull public static @NotNull BadTypeError sigmaAcc(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, int ix, @NotNull @NotNull org.aya.syntax.core.term.Term actualType) -
sigmaCon
@NotNull public static @NotNull BadTypeError sigmaCon(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull @NotNull org.aya.syntax.core.term.Term actualType) -
structAcc
@NotNull public static @NotNull BadTypeError structAcc(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull @NotNull String fieldName, @NotNull @NotNull org.aya.syntax.core.term.Term actualType) -
structCon
@NotNull public static @NotNull BadTypeError structCon(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull @NotNull org.aya.syntax.core.term.Term actualType) -
univ
@NotNull public static @NotNull BadTypeError univ(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr, @NotNull @NotNull org.aya.syntax.core.term.Term actual) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
expr
@NotNull public @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr()Returns the value of theexprrecord component.- Specified by:
exprin interfaceSourceNodeProblem- Returns:
- the value of the
exprrecord component
-
actualType
@NotNull public @NotNull org.aya.syntax.core.term.Term actualType()Returns the value of theactualTyperecord component.- Returns:
- the value of the
actualTyperecord component
-
action
@NotNull public @NotNull org.aya.pretty.doc.Doc action()Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
thing
@NotNull public @NotNull org.aya.pretty.doc.Doc thing()Returns the value of thethingrecord component.- Returns:
- the value of the
thingrecord component
-
desired
@NotNull public @NotNull org.aya.generic.AyaDocile desired()Returns the value of thedesiredrecord component.- Returns:
- the value of the
desiredrecord component
-
state
Returns the value of thestaterecord component.
-