diff options
author | Nadrieril | 2020-01-24 16:29:25 +0000 |
---|---|---|
committer | Nadrieril | 2020-01-24 16:29:25 +0000 |
commit | bd1eb36503aa6e03532fefcfd0c4f27eb62c99d2 (patch) | |
tree | 7af22057fb7938648a5bf527768218e565d5170f /dhall/src/semantics/core/visitor.rs | |
parent | fccccac6463cb3ca91206d5c41bbf51fc2ec4e0f (diff) |
Restore all types in Value::to_tyexpr
Diffstat (limited to '')
-rw-r--r-- | dhall/src/semantics/core/visitor.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/dhall/src/semantics/core/visitor.rs b/dhall/src/semantics/core/visitor.rs index ee44ed7..64250b0 100644 --- a/dhall/src/semantics/core/visitor.rs +++ b/dhall/src/semantics/core/visitor.rs @@ -98,7 +98,9 @@ where annot: v.visit_val(annot)?, closure: closure.clone(), }, - AppliedBuiltin(b, xs) => AppliedBuiltin(*b, v.visit_vec(xs)?), + AppliedBuiltin(b, xs, types) => { + AppliedBuiltin(*b, v.visit_vec(xs)?, v.visit_vec(types)?) + } Var(v, w) => Var(v.clone(), *w), Const(k) => Const(*k), BoolLit(b) => BoolLit(*b), @@ -112,15 +114,17 @@ where RecordType(kts) => RecordType(v.visit_map(kts)?), RecordLit(kvs) => RecordLit(v.visit_map(kvs)?), UnionType(kts) => UnionType(v.visit_optmap(kts)?), - UnionConstructor(l, kts, t) => { - UnionConstructor(l.clone(), v.visit_optmap(kts)?, t.clone()) - } + UnionConstructor(l, kts, uniont) => UnionConstructor( + l.clone(), + v.visit_optmap(kts)?, + v.visit_val(uniont)?, + ), UnionLit(l, x, kts, uniont, ctort) => UnionLit( l.clone(), v.visit_val(x)?, v.visit_optmap(kts)?, - uniont.clone(), - ctort.clone(), + v.visit_val(uniont)?, + v.visit_val(ctort)?, ), TextLit(ts) => TextLit( ts.iter() |