summaryrefslogtreecommitdiff
path: root/dhall/src/expr.rs
diff options
context:
space:
mode:
authorNadrieril2019-04-22 23:31:42 +0200
committerNadrieril2019-04-22 23:31:42 +0200
commit60df4ed07a752d256888e6b4449a48bfa43cf79f (patch)
tree16fcd64f6d255f4391477bb9af57b745e8efb82e /dhall/src/expr.rs
parent53f886c0f5044e4bfe7de756b8c47d992f91b03e (diff)
Temporarily simplify functions depending on TypeInternal
Diffstat (limited to '')
-rw-r--r--dhall/src/expr.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/dhall/src/expr.rs b/dhall/src/expr.rs
index 1840eba..94093a9 100644
--- a/dhall/src/expr.rs
+++ b/dhall/src/expr.rs
@@ -136,12 +136,15 @@ impl<'a> Normalized<'a> {
#[doc(hidden)]
impl<'a> Type<'a> {
pub(crate) fn unnote<'b>(self) -> Type<'b> {
- use TypeInternal::*;
- Type(match self.0 {
- Expr(e) => Expr(Box::new(e.unnote())),
- Const(c) => Const(c),
- SuperType => SuperType,
- })
+ // use TypeInternal::*;
+ // Type(match self.0 {
+ // Expr(e) => Expr(Box::new(e.unnote())),
+ // Const(c) => Const(c),
+ // SuperType => SuperType,
+ // })
+
+ // Yes, this is positively horrible. Please forgive me.
+ unsafe { std::mem::transmute::<Type<'a>, Type<'b>>(self) }
}
}