def fetch
import ezx@1.11.0.0/src/hub/get.bend as Getimport Base
import snap@1.4.0.0/main.bend as R
import ezx@1.11.0.0/src/hub/hub.bend as Hub
55# the file at a url, accepted only when it hashes to `want`
56def fetch(+url: String, want: String) -> IO(Hub.Got):
57 do IO<Hub.Got>:
58 +out : String <- get(url)
59 return Hub.judge(R.ok(out), Hub.matches(want, R.text(out)), url, R.text(out))