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
{{ message }}
This repository was archived by the owner on May 27, 2025. It is now read-only.
It'd be great to write functions like the one below without having to construct and pass the arguments X and Y, whose definitions are already known (and insisted upon) by the function itself:
//
// Allocate a ref cell, holding a cons cell, pointing at a list:
//
// ref cons ref list
// |{@!}X1|--->|X1|_|*|-->|Y1|--> |...[X2][Y2]...|
//
// : Ref[{@!}X1](List[X1%X2][Y1%Y2])
//
let ref_cons:(
Thk[0]
foralli (X,X1,X2):NmSet | ((X1%X2)=X:NmSet).
foralli (Y,Y1,Y2):NmSet | ((Y1%Y2)=Y:NmSet).
0 Nm[X1] ->
0 Nat ->
0 Ref[Y1](List[X2][Y2]) ->
{{@!}X;0} F Ref[{@!}X1](List[X1%X2][Y1%Y2])
) = {
ret thunk #n.#h.#t. ref n
roll inj2 pack (X1,X2,Y1,Y2) (n, h, t)
}
I think doing so is only a matter of supporting apartness propositions directly, in addition to equality propositions.