def int_in_defect
bend-schema-lib@0.4.1.0 · core.bend:998
import bend-schema-lib@0.4.1.0/core.bend as Core
import Base
998def int_in_defect(+lo: Int, +hi: Int, r: Raw, p: List<&2, Step>) -> Maybe<&2, Why>:
999 match r p:
1000 case RNum{+n} Nil{}:
1001 guard(Bool.not(int_ok(lo, hi, IPos{n})), Some{IntNotIn{lo, hi}})
1002 case RNeg{+n} Nil{}:
1003 guard(Bool.not(int_ok(lo, hi, INeg{n})), Some{IntNotIn{lo, hi}})
1004 case RNum{n} st <> q:
1005 None{}
1006 case RNeg{n} st <> q:
1007 None{}
1008 case x Nil{}:
1009 Some{missing_or(x, NotInt{})}
1010 case x st <> q:
1011 None{}