brownplt / ZZZ-captain-teach

Set sail for Learning Island! Deprecated and no longer maintained
5 stars 1 forks source link

Interaction window bug- "where" block doesn't work in the interpreter #6

Closed vhsiao closed 11 years ago

vhsiao commented 11 years ago

The following code should throw an error in the where block:

fun length(l :: List) -> Number:
  cases(List) l:
    | empty => 0
    | link(f, r) => 2 + length(r)
  end
where:
  length(empty) is 6
  length(link(1, empty)) is 1
  length(link(1, link(2, empty))) is 2
end

however, it executes without complaint. The same code correctly throws an error if you run it from the "run" button on the left panel.

The same thing happens whenever there's a "where" block in the interactions window. Though I remember someone saying in class that this feature's actually just not ready.

jpolitz commented 11 years ago

Thanks for the report. Just to clarify, by "the interpreter", you mean the interactions window on the right, correct?

vhsiao commented 11 years ago

Oops! Yes, sorry. Just edited my post.

On Sun, Sep 8, 2013 at 2:19 PM, Joe Politz notifications@github.com wrote:

Thanks for the report. Just to clarify, by "the interpreter", you mean the interactions window on the right, correct?

— Reply to this email directly or view it on GitHubhttps://github.com/brownplt/captain-teach/issues/6#issuecomment-24026195 .

jpolitz commented 11 years ago

Closed by https://github.com/brownplt/pyret-lang/commit/9aa80e86d5751c51e805a77897a2429cecb30fca and cc53122281c39c1135a14ba4ff79e11a8124f5d2

jpolitz commented 11 years ago

Thanks for the report, I pushed this up onto the main site this morning. Should work now.

vhsiao commented 11 years ago

wow awesome!! thanks.