brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 109 forks source link

another "refinements should have been removed" error #1210

Closed shriram closed 6 years ago

shriram commented 6 years ago
data File:
  | file(name :: String, size :: Number, content :: String)
end

fun get-sizes(lof :: List<File>) -> Number:
  cases (List) lof:
    | empty => 0
    | link(f,r) =>
      f.size + 1 + get-sizes(r)
  end
where:
  get-sizes([list: ]) is 0
  get-sizes([list: 
      file("system32", 1, "delete this"), 
      file("virus.exe", 1, "pls open"), 
      file("emails", 30000, "inside")])
    is 30005
end

Note that deleting the first test (empty list) still produces the error, so the problem is caused entirely by the second test.

shriram commented 6 years ago

@mkolosick Students are still getting this error, and since it's fatal, they have to stop using the type checker for that assignment. These are students trying to use it in part (they say) because we asked them to try it out and provide feedback, so we don't want to lose them.

mkolosick commented 6 years ago

@jpolitz: This is fixed on horizon in https://github.com/brownplt/pyret-lang/commit/88ecfa8c3a61299eb24b9c0197c4bfc570f7f113, should we make the fix on master or merge horizon?

jpolitz commented 6 years ago

Thanks, I'll push this out today.

jpolitz commented 6 years ago

Or at least I hope to. Fighting with a recent update of npm's stable version on Travis that is buggy. Sorry for the delay.

shriram commented 6 years ago

Thanks. Please notify when it's done.

mkolosick commented 6 years ago

@jpolitz This seems to be done. Can you confirm and close?

blerner commented 6 years ago

@jpolitz @shriram ping?

shriram commented 6 years ago

Well, I don't see the error any longer, so we can close this. I'm a bit annoyed that this notification never happened, so we didn't get to tell students to go back to using the checker, thereby probably losing useful student data…but that's unrelated to this PR.

jpolitz commented 6 years ago

Sorry – I actually got it working that same night, and it looks like I just never re-notified. :-/ I'm not sure if there's a good automation solution here, since even notifying folks of new Pyret versions wouldn't tell you it's this fix that happened. I just need to track things like this better.

On Thu, Apr 12, 2018 at 4:57 PM, Shriram Krishnamurthi < notifications@github.com> wrote:

Closed #1210 https://github.com/brownplt/pyret-lang/issues/1210.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/brownplt/pyret-lang/issues/1210#event-1572196176, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHUU3TeYTqPaVQGVnbslbqivhQOoaD9ks5tn-nogaJpZM4Ppi0V .