View raw

1 (** Curated exercises and their permitted relationships. *) 2 3 type equipment = 4 | Barbell 5 | Cable 6 | Dumbbell 7 | Machine 8 | Bodyweight 9 | Unspecified 10 11 type movement = 12 | Fly 13 | Crossover 14 | Pec_deck 15 | Press 16 | Lateral_raise 17 | French_press 18 | Pressdown 19 | Dip 20 | Pullover 21 | Pulldown 22 | Row 23 | Chin 24 | Shrug 25 | Hyperextension 26 | Deadlift 27 | Curl 28 | Leg_extension 29 | Leg_press 30 | Squat 31 | Leg_curl 32 | Calf_raise 33 | Sit_up 34 35 type variation = 36 | Standard 37 | Incline 38 | Bent_over 39 | Rear_delt 40 | Lying 41 | Triceps 42 | Close_grip_palms_up 43 | Straight_arm 44 | Preacher 45 46 type key = { equipment : equipment; movement : movement; variation : variation } 47 (** The catalog identity: equipment × movement × variation. *) 48 49 type t 50 (** An opaque catalog entry, only obtainable by lookup. *) 51 52 type id = private string 53 (** A stable serialized identifier for external boundaries. *) 54 55 val find : key -> t option 56 (** Looks up an exercise by structured identity. *) 57 58 val find_id : string -> t option 59 (** Looks up an exercise by stable serialized identifier. *) 60 61 val key : t -> key 62 val id : t -> id 63 val name : t -> string 64 val equal : t -> t -> bool 65 val pp : Format.formatter -> t -> unit 66 67 val may_pre_exhaust : isolation:t -> compound:t -> bool 68 (** Whether the pair shares the isolation's target. *) 69 70 val may_substitute : original:t -> candidate:t -> bool 71 (** Whether [candidate] is author-approved for [original]. *) 72