summaryrefslogtreecommitdiff
path: root/src/errors/IfBranchMismatch.txt
diff options
context:
space:
mode:
authorNadrieril2019-03-01 17:28:19 +0100
committerNadrieril2019-03-01 17:28:19 +0100
commite5d9aee00b0c775df1d8e2d8819aeb80dffa73c2 (patch)
treee763a24a0d635048232e72e167ca37eafec69369 /src/errors/IfBranchMismatch.txt
parent8a2b7536902831079eddd7b00291b718f5dd7186 (diff)
Split abnf_to_pest and dhall into their own crates
Diffstat (limited to 'src/errors/IfBranchMismatch.txt')
-rw-r--r--src/errors/IfBranchMismatch.txt63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/errors/IfBranchMismatch.txt b/src/errors/IfBranchMismatch.txt
deleted file mode 100644
index a95b130..0000000
--- a/src/errors/IfBranchMismatch.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-Explanation: Every ❰if❱ expression has a ❰then❱ and ❰else❱ branch, each of which
-is an expression:
-
-
- Expression for ❰then❱ branch
- ⇩
- ┌────────────────────────────────┐
- │ if True then "Hello, world!" │
- │ else "Goodbye, world!" │
- └────────────────────────────────┘
- ⇧
- Expression for ❰else❱ branch
-
-
-These two expressions must have the same type. For example, the following ❰if❱
-expressions are all valid:
-
-
- ┌──────────────────────────────────┐
- │ λ(b : Bool) → if b then 0 else 1 │ Both branches have type ❰Integer❱
- └──────────────────────────────────┘
-
-
- ┌────────────────────────────┐
- │ λ(b : Bool) → │
- │ if b then Natural/even │ Both branches have type ❰Natural → Bool❱
- │ else Natural/odd │
- └────────────────────────────┘
-
-
-However, the following expression is $_NOT valid:
-
-
- This branch has type ❰Integer❱
- ⇩
- ┌────────────────────────┐
- │ if True then 0 │
- │ else "ABC" │
- └────────────────────────┘
- ⇧
- This branch has type ❰Text❱
-
-
-The ❰then❱ and ❰else❱ branches must have matching types, even if the predicate is
-always ❰True❱ or ❰False❱
-
-Your ❰if❱ expression has the following ❰then❱ branch:
-
-↳ $txt0
-
-... which has type:
-
-↳ $txt2
-
-... and the following ❰else❱ branch:
-
-↳ $txt1
-
-... which has a different type:
-
-↳ $txt3
-
-Fix your ❰then❱ and ❰else❱ branches to have matching types