summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/typecheck.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs
index cab734e..94a86e1 100644
--- a/dhall/src/typecheck.rs
+++ b/dhall/src/typecheck.rs
@@ -565,7 +565,7 @@ pub fn type_with(
NaturalPlus => dhall::subexpr!(Natural),
NaturalTimes => dhall::subexpr!(Natural),
TextAppend => dhall::subexpr!(Text),
- _ => panic!("Unimplemented typecheck case: {:?}", e),
+ _ => Err(mkerr(Unimplemented))?,
});
ensure_equal!(
@@ -583,7 +583,7 @@ pub fn type_with(
Ok(RetType(t))
}
Embed(p) => match p {},
- _ => panic!("Unimplemented typecheck case: {:?}", e),
+ _ => Err(mkerr(Unimplemented))?,
},
}?;
match ret {
@@ -629,6 +629,7 @@ pub enum TypeMessage<S> {
NoDependentLet(Normalized, Normalized),
NoDependentTypes(Normalized, Normalized),
MustCombineARecord(SubExpr<S, X>, SubExpr<S, X>),
+ Unimplemented,
}
/// A structured type error that includes context