summaryrefslogtreecommitdiff
path: root/dhall/src/error
diff options
context:
space:
mode:
authorFintanH2019-07-31 12:05:48 +0100
committerFintanH2019-08-01 00:03:32 +0100
commita53fc6e6767bba80bf1697d732d88c4a1e0e9e42 (patch)
tree34fb4f39e4dd90f75c48f1f70065f25b6fadcd56 /dhall/src/error
parent2a6a37398394a33e281fa4f2055a3b33c21502c3 (diff)
Add the typechecking of RecursiveRecordMerge.
This introduces an external function for HashMaps to perform an outer join so that you can do a unionWith but with more power by having a new tagert type. Using outer_join and recursively looking through records of records we have an implementation for combining records.
Diffstat (limited to 'dhall/src/error')
-rw-r--r--dhall/src/error/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs
index 125d013..2345348 100644
--- a/dhall/src/error/mod.rs
+++ b/dhall/src/error/mod.rs
@@ -55,6 +55,7 @@ pub(crate) enum TypeMessage {
TypeMismatch(Typed, Normalized, Typed),
AnnotMismatch(Typed, Normalized),
Untyped,
+ FieldCollision(Label),
InvalidListElement(usize, Normalized, Typed),
InvalidListType(Normalized),
InvalidOptionalType(Normalized),
@@ -63,6 +64,7 @@ pub(crate) enum TypeMessage {
IfBranchMustBeTerm(bool, Typed),
InvalidFieldType(Label, Type),
NotARecord(Label, Normalized),
+ MustCombineRecord(Typed),
MissingRecordField(Label, Typed),
MissingUnionField(Label, Normalized),
BinOpTypeMismatch(BinOp, Typed),
@@ -78,6 +80,7 @@ pub(crate) enum TypeMessage {
MergeHandlerReturnTypeMustNotBeDependent,
ProjectionMustBeRecord,
ProjectionMissingEntry,
+ RecordMismatch(Typed, Typed),
Sort,
RecordTypeDuplicateField,
UnionTypeDuplicateField,