def verify_plan

cswap-bend-cli@0.1.0.0 · store.bend:131

import cswap-bend-cli@0.1.0.0/store.bend as Store
import Base
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/store/plan.bend as SPlan

131def verify_plan(+p: SPlan.Plan, +id: Ident, fetch: String -> IO(SPlan.Prof)) -> Act.of(String):
132  match p:
133    case SPlan.PSkip{why}:
134      Act.pure(String, notice_text(id_email(id), why))
135    case SPlan.PFetch{token}:
136      do ActM<String>:
137        prof : SPlan.Prof <- Act.lift(SPlan.Prof, fetch(token))
138        verify_prof(id, prof)

Uses (13)

Used by (1)