You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rename.sh §11: defrecord+defunion idiom renames as one type (no split); multi-arity
defn bodies renamed; ->Name constructor renames (same + cross-module); reader ~ unquote
inside a quote escapes. delete.sh §8: multi-arity body refs and ->constructor refs are
seen by the no-orphaned-refs scan.
# 11a. the shipped match-fixture idiom: a defrecord that is also a defunion member renames as ONE type
216
+
printf'#lang beagle/clj\n(ns ri)\n(defrecord Ok [(value :- Any)])\n(defrecord Err [(error :- String)])\n(defunion Result Ok Err)\n(defn h [r :- Result] :- Any (match r [(Ok v) v] [(Err e) e]))\n'>"$W/ri.bclj"
chk "defrecord+union+match all rename together (no type split)""grep -qF '(defrecord Yes' <<<\"\$ri\" && grep -qF '(defunion Result Yes Err)' <<<\"\$ri\" && grep -qF '[(Yes v)' <<<\"\$ri\" && grep -qF '(defrecord Err' <<<\"\$ri\""
221
+
# 11b. multi-arity defn: a def used in EVERY arity body renames
222
+
printf'#lang beagle/clj\n(ns rm)\n(def base :- Int 5)\n(defn f\n ([x :- Int] :- Int (+ x base))\n ([x :- Int y :- Int] :- Int (+ x y base)))\n'>"$W/rm.bclj"
0 commit comments