summaryrefslogtreecommitdiff
path: root/dhall/src/error
diff options
context:
space:
mode:
authorNadrieril2019-08-19 12:25:09 +0200
committerNadrieril2019-08-19 12:25:09 +0200
commit29016b78736dca857e4e7f7c4dc68ed5e30c28bb (patch)
tree365b46d7b954e2305a9371c996dd6a91e2fe645c /dhall/src/error
parente70da4c0e9ee2354d757f19f1712f5b04f7acc99 (diff)
s/to_valuef/to_whnf/ and avoid cloning ValueFs when possible
Diffstat (limited to 'dhall/src/error')
-rw-r--r--dhall/src/error/mod.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs
index 8f6ff51..34a89c0 100644
--- a/dhall/src/error/mod.rs
+++ b/dhall/src/error/mod.rs
@@ -4,7 +4,7 @@ use dhall_syntax::{BinOp, Import, Label, ParseError, V};
use crate::core::context::TypecheckContext;
use crate::phase::resolve::ImportStack;
-use crate::phase::{Normalized, NormalizedSubExpr, Type, Typed};
+use crate::phase::{NormalizedSubExpr, Type, Typed};
pub type Result<T> = std::result::Result<T, Error>;
@@ -48,24 +48,24 @@ pub struct TypeError {
#[derive(Debug)]
pub(crate) enum TypeMessage {
UnboundVariable(V<Label>),
- InvalidInputType(Normalized),
- InvalidOutputType(Normalized),
+ InvalidInputType(Typed),
+ InvalidOutputType(Typed),
NotAFunction(Typed),
- TypeMismatch(Typed, Normalized, Typed),
- AnnotMismatch(Typed, Normalized),
+ TypeMismatch(Typed, Typed, Typed),
+ AnnotMismatch(Typed, Typed),
Untyped,
FieldCollision(Label),
- InvalidListElement(usize, Normalized, Typed),
- InvalidListType(Normalized),
- InvalidOptionalType(Normalized),
+ InvalidListElement(usize, Typed, Typed),
+ InvalidListType(Typed),
+ InvalidOptionalType(Typed),
InvalidPredicate(Typed),
IfBranchMismatch(Typed, Typed),
IfBranchMustBeTerm(bool, Typed),
InvalidFieldType(Label, Type),
- NotARecord(Label, Normalized),
+ NotARecord(Label, Typed),
MustCombineRecord(Typed),
MissingRecordField(Label, Typed),
- MissingUnionField(Label, Normalized),
+ MissingUnionField(Label, Typed),
BinOpTypeMismatch(BinOp, Typed),
InvalidTextInterpolation(Typed),
Merge1ArgMustBeRecord(Typed),