def num.good

cswap-bend-cli@0.1.0.0 · profile.bend:322

import cswap-bend-cli@0.1.0.0/profile.bend as Profile
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/setwrite.bend as Setwrite

322def num.good(+p: Setwrite.Parsed) -> NumRes:
323  match p:
324    case Setwrite.Bad{m}:
325      NBad{m}
326    case Setwrite.Good{Json.JNum{t}}:
327      NSet{Some{t}}
328    case Setwrite.Good{j}:
329      NBad{"expected a number"}

Uses (4)

Used by (1)