def lack

bolt@1.27.0.0 · src/rules/pedantic/foreign.bend:52

import bolt@1.27.0.0/src/rules/pedantic/foreign.bend as Foreign
import Base

52# what the lanes lack, as a message ("" for nothing)
53def lack(mm: Maybe<&2, Lanes>, +native: Bool, +name: String) -> String:
54  match mm:
55    case None{}:
56      ""
57    case Some{Lanes{+c, +js}}:
58      Bool.pick(String, Bool.and(c, Bool.and(Bool.not(js), Bool.not(native))),
59        "Foreign def " ++ name ++ " has a .c body but no .js body, so it cannot run on the JS lane.",
60        Bool.pick(String, Bool.and(js, Bool.not(c)),
61          "Foreign def " ++ name ++ " has a .js body but no .c body, so it cannot run in a native build.", ""))

Uses (8)

Used by (1)