The type checker's diagnostics: one named error/warning variant per violation.
The type checker's errors. todo is a placeholder, to be replaced by named variants as
checking rules are implemented.
- todo
(pos : SourceSpan)
(msg : String)
: TCError
Escape hatch: an arbitrary message at a position, standing in for a real named variant.
- unboundVariable
(pos : SourceSpan)
(name : String)
: TCError
A
Γ-lookup miss. - failedToConvertTypes
(pos : SourceSpan)
(expected got : TypedTLAPlus.Typ)
: TCError
No coercion exists from the synthesized type to the expected one.
- expectedTypeAnnotation
(pos : SourceSpan)
(what : String)
: TCError
A construct that can only synthesize when annotated was used with no annotation present.
- cannotInferType
(pos : SourceSpan)
(reason : String)
: TCError
A checking-only construct (empty set, unbounded
CHOOSE) was hit in a position that needs a synthesized type. - notASetType
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
A
Set(τ)type was expected here, but something else was found. - notARecordType
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
A record type was expected here, but something else was found.
- notIndexable
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
Indexing (
e[e']) requires a function, tuple, or sequence type. - unknownField
(pos : SourceSpan)
(field : String)
(available : List String)
: TCError
A record access/update named a field the record's type doesn't have.
- invalidTupleIndex
(pos : SourceSpan)
(index : String)
(arity : ℕ)
: TCError
A tuple access/update's index wasn't a literal natural number in range.
- notAnOperatorType
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
An operator call's callee didn't synthesize an operator type at all.
- arityMismatch
(pos : SourceSpan)
(expected got : ℕ)
: TCError
An operator call's argument count didn't match its type's parameter count.
- ambiguousType
(pos : SourceSpan)
: TCError
A
lub-based synthesis rule found no common type across its branches/elements. - notAFunctionType
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
A function type (
τ -> τ') was expected here, but something else was found. - notATupleType
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
A tuple type was expected here, but something else was found.
- paramArityMismatch
(pos : SourceSpan)
(param : String)
(declared inferred : ℕ)
: TCError
A higher-order operator-definition parameter's declared arity (from
F(_,...,_)'s_count) didn't match its annotated type's own operator-arity. - notAChannelType
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
A
receive/send/multicaststatement's channel reference didn't synthesize aChannel(τ)-shaped type. - notShowable
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
A
printstatement's argument didn't synthesize ashowabletype. - notSendable
(pos : SourceSpan)
(got : TypedTLAPlus.Typ)
: TCError
A channel's declared element type isn't
sendable—Operator/Channel/Const/rigid type variables, or anything containing one, can't be sent over a channel. - unconstrainedMetavariable
(pos : SourceSpan)
: TCError
A metavariable left over at the end of a declaration's checking had no pending upper bound recorded on it at all — it was never actually constrained by anything during checking.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- instReprTCError = { reprPrec := instReprTCError.repr }
Equations
- instInhabitedTCError = { default := instInhabitedTCError.default }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- instBEqTCError = { beq := instBEqTCError.beq }
Equations
- One or more equations did not get rendered due to their size.
The type checker's non-fatal diagnostics, collected out-of-band. todo is a placeholder.
- todo
(pos : SourceSpan)
(msg : String)
: TCWarning
Escape hatch: an arbitrary message at a position, standing in for a real named variant.
- unsafeCast
(pos : SourceSpan)
(op : String)
: TCWarning
A call to an unsafe representation downcast —
Fugue!FunAsSeqorFugue!SetAsFun— whose compiled form aborts at runtime when its precondition (a1..ndomain, a functional pair set) does not hold.opis the operator's name.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- instReprTCWarning = { reprPrec := instReprTCWarning.repr }
Equations
- instInhabitedTCWarning = { default := instInhabitedTCWarning.default }
Equations
- instBEqTCWarning = { beq := instBEqTCWarning.beq }
Equations
- instBEqTCWarning.beq (TCWarning.todo a a_1) (TCWarning.todo b b_1) = (a == b && a_1 == b_1)
- instBEqTCWarning.beq (TCWarning.unsafeCast a a_1) (TCWarning.unsafeCast b b_1) = (a == b && a_1 == b_1)
- instBEqTCWarning.beq x✝¹ x✝ = false
Instances For
The -W<name>/-Wno-<name> name a given warning is filtered under.
Equations
- (TCWarning.todo a a_1).name = "todo"
- (TCWarning.unsafeCast a a_1).name = "unsafe"
Instances For
Equations
- One or more equations did not get rendered due to their size.