Closed duvenaud closed 1 year ago
Now that stacks have landed, I'm reviving quicksort. However, I can't seem to manipulate a reference inside of a with_stack. Here's a MWE:
with_stack
def func {h} (xs: Ref h Nat) : {State h} Unit = with_stack Unit \stack. xs := 0
gives
Type error: Expected: {State h.1} Actual: {State h|a} (Solving for: [a]) xs := 0 ^^^
Thanks for catching that. Fix is in #1206. Do you need pop too?
pop
Thanks! D'oh, I should have been able to fix that myself. I already wrote pop myself though, thanks for the offer.
Now that stacks have landed, I'm reviving quicksort. However, I can't seem to manipulate a reference inside of a
with_stack
. Here's a MWE:gives