diff options
author | Nadrieril | 2019-05-04 18:41:21 +0200 |
---|---|---|
committer | Nadrieril | 2019-05-04 18:41:21 +0200 |
commit | 6ad7a2000bf32b96be731cd51da5b841976dae12 (patch) | |
tree | c0ff9231ed28538f4f1dc13d8e6347e3c14a06b5 /dhall_syntax/src/core.rs | |
parent | 153cf8dab3b80aba30ac3adfd44e4be251494ea2 (diff) |
Revert "Recover arrow type detection"
This reverts commit 153cf8dab3b80aba30ac3adfd44e4be251494ea2.
Diffstat (limited to '')
-rw-r--r-- | dhall_syntax/src/core.rs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/dhall_syntax/src/core.rs b/dhall_syntax/src/core.rs index 389f037..c8a2425 100644 --- a/dhall_syntax/src/core.rs +++ b/dhall_syntax/src/core.rs @@ -60,7 +60,7 @@ pub enum Const { /// The `Int` field is a DeBruijn index. /// See dhall-lang/standard/semantics.md for details #[derive(Debug, Clone, PartialEq, Eq)] -pub struct Var<VarLabel>(pub VarLabel, pub usize); +pub struct Var<Label>(pub Label, pub usize); // Definition order must match precedence order for // pretty-printing to work correctly @@ -529,19 +529,6 @@ impl<'a> From<&'a Label> for Var<Label> { } } -/// Trait for things that capture a label used for variables. -/// Allows normalization to be generic in whether to alpha-normalize or not. -pub trait VarLabel: std::fmt::Display + Clone { - /// Is `self` the default variable (i.e. "_") ? - fn is_underscore_var(&self) -> bool; -} - -impl VarLabel for Label { - fn is_underscore_var(&self) -> bool { - &String::from(self) == "_" - } -} - /// `shift` is used by both normalization and type-checking to avoid variable /// capture by shifting variable indices /// See https://github.com/dhall-lang/dhall-lang/blob/master/standard/semantics.md#shift |