(.module: [library [lux {"-" [Type]} [abstract [equivalence {"+" [Equivalence]}] [order {"+" [Order]}] [hash {"+" [Hash]}]] [data ["[0]" product] ["[0]" text ("[1]#[0]" order) ["%" format {"+" [format]}]]]]] ["[0]" // "_" ["[1]" artifact {"+" [Artifact]} ("[1]#[0]" order) [type {"+" [Type]}]]]) (type: .public Dependency (Record [#artifact Artifact #type Type])) (def: .public hash (Hash Dependency) ($_ product.hash //.hash text.hash )) (def: .public equivalence (Equivalence Dependency) (# hash &equivalence)) (implementation: .public order (Order Dependency) (def: &equivalence ..equivalence) (def: (< reference subject) (<| (or (//#< (value@ #artifact reference) (value@ #artifact subject))) (and (//#= (value@ #artifact reference) (value@ #artifact subject))) (text#< (value@ #type reference) (value@ #type subject)))))