let of_int x =
  if x >= 0 then Ok x
  else error "invalid PHRED score" x sexp_of_int