Reject ranges that start beyond last item

This commit is contained in:
Joe Nelson
2014-09-07 12:47:07 -07:00
parent db7ccda74d
commit fcdc37d20b
4 changed files with 33 additions and 13 deletions
+1 -1
View File
@@ -49,4 +49,4 @@ offset :: NonnegRange -> Int
offset range =
case rangeLower range
of BoundaryBelow from -> from
_ -> 0 -- should never happen
_ -> error "range without lower bound" -- should never happen