thinking about how best to do type unification for structs in femstache
if i have constraints like fresh a; a ~ { x: bool, y: string }; a ~ { x: bool, z: string }, this should unify as a = { x: bool, y: optional string, z: optional string }
but the first constraint already replaces all occurences of a with { x: bool, y: string } and then the unification { x: bool, y: string } ~ { x: bool, z: string } happens, which succeeds but can't really "change" the shape of the struct
thinking of maybe adding a kind of "type shape" thing where { x: int, y: bool } turns into fresh a; member "x" int a, member "y" bool a => a
hmm
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
lumi :blobcatnom: :blobcatflower: (lumi@snug.moe)'s status on Friday, 18-Sep-2026 21:36:16 JST
lumi :blobcatnom: :blobcatflower: