You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sealedtraitNatTfinalcaseclassZero() extendsNatTfinalcaseclassSucc[+N<:NatT](n: N) extendsNatTsealedtraitNatDividesH[X<:Succ[NatT], Y<:NatT, Z<:NatT]
objectNatDividesH:given [X<:Succ[NatT]]:NatDividesH[X, _0, _0]()
given [X<:Succ[NatT], Y<:NatT](usingNatDividesH[X, Y, _0]):NatDividesH[X, Y, X]()
given [X<:Succ[NatT], Y<:NatT, Z<:NatT](usingNatDividesH[X, Y, Succ[Z]]):NatDividesH[X, Succ[Y], Z]()
sealedtraitNatDivides[X<:Succ[NatT], Y<:NatT]
objectNatDivides:given [X<:Succ[NatT], Y<:NatT](usingproof: NatDividesH[X, Y, _0]):NatDivides[X, Y]()
@main defmain():Unit=
summon[NatDivides[_2, _2]]
type_0=Zerotype_1=Succ[_0]
type_2=Succ[_1]
Output
no giveninstance of typeNatDivides[_2, _2] was found for parameter x of method summon in objectPredef.
Ifound:
NatDivides.given_NatDivides_X_Y[Succ[_1], Succ[_1]](
NatDividesH.given_NatDividesH_X_Succ_Z[Succ[_1], Succ[_0], Zero](
NatDividesH.given_NatDividesH_X_Y_X[X, Y]
)
)
Butgiveninstance given_NatDividesH_X_Y_X in objectNatDividesH does not matchtypeNatDividesH[Succ[_1], Succ[_0], Succ[Zero]].
Note:giveninstance given_NatDividesH_X_Succ_Z in objectNatDividesH was not considered because it was not imported with`import given`.
Expectation
given instance given_NatDividesH_X_Succ_Z in object NatDividesH should have been considered. No import given can currently fix this error (see this thread).
The text was updated successfully, but these errors were encountered:
Compiler version
3.1.3
Minimized code
Output
Expectation
given instance
given_NatDividesH_X_Succ_Z
in objectNatDividesH
should have been considered. Noimport given
can currently fix this error (see this thread).The text was updated successfully, but these errors were encountered: