From 63d3356f40ef48a7735a2151a14ad9952fc245db Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 17 Apr 2019 01:22:28 +0200 Subject: Normalize union constructors --- dhall_core/src/visitor.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dhall_core/src/visitor.rs') diff --git a/dhall_core/src/visitor.rs b/dhall_core/src/visitor.rs index 1ea3fb1..c123275 100644 --- a/dhall_core/src/visitor.rs +++ b/dhall_core/src/visitor.rs @@ -178,11 +178,14 @@ where RecordType(kts) => RecordType(btmap(kts, v)?), RecordLit(kvs) => RecordLit(btmap(kvs, v)?), UnionType(kts) => UnionType(btoptmap(kts, v)?), - UnionLit(k, x, kvs) => UnionLit( + UnionLit(k, x, kts) => UnionLit( v.visit_label(k)?, v.visit_subexpr(x)?, - btoptmap(kvs, v)?, + btoptmap(kts, v)?, ), + UnionConstructor(x, kts) => { + UnionConstructor(v.visit_label(x)?, btoptmap(kts, v)?) + } Merge(x, y, t) => Merge( v.visit_subexpr(x)?, v.visit_subexpr(y)?, -- cgit v1.2.3