tov / dssl2

A data structures student language, version 2
MIT License
9 stars 5 forks source link

Error message for `range` is leaky #32

Open stamourv opened 1 year ago

stamourv commented 1 year ago

The code range([1,2]) results in the error

range: contract violation
  expected: num?
  given: [1, 2]
  in: the 1st argument of
      the 3rd case of
      (case->
       (-> num? num? num? AnyC)
       (-> num? num? AnyC)
       (-> num? AnyC))

This is the correct contract for DSSL's range, but having an error message in terms of case-> and prefix -> isn't ideal.