(.module: lux (lux (control monad ["ex" exception #+ exception:]) (data text/format [product]) [macro] (lang [type] (type ["tc" check]))) (luxc ["&" lang] (lang analysis))) (exception: #export (Variant-Tag-Out-Of-Bounds {message Text}) message) (def: #export (variant-out-of-bounds-error type size tag) (All [a] (-> Type Nat Nat (Meta a))) (&.throw Variant-Tag-Out-Of-Bounds (format " Tag: " (%n tag) "\n" "Variant Size: " (%n size) "\n" "Variant Type: " (%type type))))