diff options
Diffstat (limited to '')
-rw-r--r-- | dhall/src/syntax/core/context.rs (renamed from dhall_syntax/src/core/context.rs) | 0 | ||||
-rw-r--r-- | dhall/src/syntax/core/expr.rs (renamed from dhall_syntax/src/core/expr.rs) | 8 | ||||
-rw-r--r-- | dhall/src/syntax/core/import.rs (renamed from dhall_syntax/src/core/import.rs) | 0 | ||||
-rw-r--r-- | dhall/src/syntax/core/label.rs (renamed from dhall_syntax/src/core/label.rs) | 0 | ||||
-rw-r--r-- | dhall/src/syntax/core/map.rs (renamed from dhall_syntax/src/core/map.rs) | 0 | ||||
-rw-r--r-- | dhall/src/syntax/core/mod.rs (renamed from dhall_syntax/src/core/mod.rs) | 0 | ||||
-rw-r--r-- | dhall/src/syntax/core/span.rs (renamed from dhall_syntax/src/core/span.rs) | 0 | ||||
-rw-r--r-- | dhall/src/syntax/core/text.rs (renamed from dhall_syntax/src/core/text.rs) | 0 | ||||
-rw-r--r-- | dhall/src/syntax/core/visitor.rs (renamed from dhall_syntax/src/core/visitor.rs) | 6 |
9 files changed, 7 insertions, 7 deletions
diff --git a/dhall_syntax/src/core/context.rs b/dhall/src/syntax/core/context.rs index 6844baa..6844baa 100644 --- a/dhall_syntax/src/core/context.rs +++ b/dhall/src/syntax/core/context.rs diff --git a/dhall_syntax/src/core/expr.rs b/dhall/src/syntax/core/expr.rs index 131f97e..5b9f401 100644 --- a/dhall_syntax/src/core/expr.rs +++ b/dhall/src/syntax/core/expr.rs @@ -1,6 +1,6 @@ -use crate::map::{DupTreeMap, DupTreeSet}; -use crate::visitor::{self, ExprFMutVisitor, ExprFVisitor}; -use crate::*; +use crate::syntax::map::{DupTreeMap, DupTreeSet}; +use crate::syntax::visitor::{self, ExprFMutVisitor, ExprFVisitor}; +use crate::syntax::*; pub type Integer = isize; pub type Natural = usize; @@ -351,7 +351,7 @@ impl<E> Expr<E> { } /// Add an isize to an usize -/// Panics on over/underflow +/// Returns `None` on over/underflow fn add_ui(u: usize, i: isize) -> Option<usize> { Some(if i < 0 { u.checked_sub(i.checked_neg()? as usize)? diff --git a/dhall_syntax/src/core/import.rs b/dhall/src/syntax/core/import.rs index da3e99b..da3e99b 100644 --- a/dhall_syntax/src/core/import.rs +++ b/dhall/src/syntax/core/import.rs diff --git a/dhall_syntax/src/core/label.rs b/dhall/src/syntax/core/label.rs index 43c3f53..43c3f53 100644 --- a/dhall_syntax/src/core/label.rs +++ b/dhall/src/syntax/core/label.rs diff --git a/dhall_syntax/src/core/map.rs b/dhall/src/syntax/core/map.rs index c4c6126..c4c6126 100644 --- a/dhall_syntax/src/core/map.rs +++ b/dhall/src/syntax/core/map.rs diff --git a/dhall_syntax/src/core/mod.rs b/dhall/src/syntax/core/mod.rs index 66bf229..66bf229 100644 --- a/dhall_syntax/src/core/mod.rs +++ b/dhall/src/syntax/core/mod.rs diff --git a/dhall_syntax/src/core/span.rs b/dhall/src/syntax/core/span.rs index f9c7008..f9c7008 100644 --- a/dhall_syntax/src/core/span.rs +++ b/dhall/src/syntax/core/span.rs diff --git a/dhall_syntax/src/core/text.rs b/dhall/src/syntax/core/text.rs index fb390ee..fb390ee 100644 --- a/dhall_syntax/src/core/text.rs +++ b/dhall/src/syntax/core/text.rs diff --git a/dhall_syntax/src/core/visitor.rs b/dhall/src/syntax/core/visitor.rs index 143e556..b76d037 100644 --- a/dhall_syntax/src/core/visitor.rs +++ b/dhall/src/syntax/core/visitor.rs @@ -1,4 +1,4 @@ -use crate::*; +use crate::syntax::*; use std::iter::FromIterator; /// A visitor trait that can be used to traverse `ExprF`s. We need this pattern so that Rust lets @@ -111,7 +111,7 @@ where .collect() } - use crate::ExprF::*; + use crate::syntax::ExprF::*; Ok(match input { Var(v) => Var(v.clone()), Lam(l, t, e) => { @@ -225,7 +225,7 @@ where Ok(()) } - use crate::ExprF::*; + use crate::syntax::ExprF::*; match input { Var(_) | Const(_) | Builtin(_) | BoolLit(_) | NaturalLit(_) | IntegerLit(_) | DoubleLit(_) => {} |