From d248762095908246951b6aa6c211587c6e333c0e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 7 Aug 2019 21:05:01 +0200 Subject: Remove union literals from the language --- dhall/src/phase/typecheck.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'dhall/src/phase/typecheck.rs') diff --git a/dhall/src/phase/typecheck.rs b/dhall/src/phase/typecheck.rs index 35bf3a9..4b3a03f 100644 --- a/dhall/src/phase/typecheck.rs +++ b/dhall/src/phase/typecheck.rs @@ -505,15 +505,6 @@ fn type_last_layer( )? .into_type(), )), - UnionLit(x, v, kvs) => { - use std::iter::once; - let kts = kvs - .iter() - .map(|(x, v)| Ok((x.clone(), v.as_ref().map(|v| v.to_type())))); - let t = v.get_type()?.into_owned(); - let kts = kts.chain(once(Ok((x.clone(), Some(t))))); - Ok(RetTypeOnly(tck_union_type(ctx, kts)?.to_type())) - } Field(r, x) => { match &r.get_type()?.to_value() { Value::RecordType(kts) => match kts.get(&x) { -- cgit v1.2.3