You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ echo '{=} // 1' | dhall --explain
Error: You can only combine records
Explanation: You can combine records using the ❰⫽❱ operator, like this:
┌───────────────────────────────────────────┐
│ { foo = 1, bar = "ABC" } ⫽ { baz = True } │
└───────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ λ(r : { foo : Bool }) → r ⫽ { bar = "ABC" } │
└─────────────────────────────────────────────┘
... but you cannot combine values that are not records.
For example, the following expressions are not valid:
┌──────────────────────────────┐
│ { foo = 1, bar = "ABC" } ⫽ 1 │
└──────────────────────────────┘
⇧
Invalid: Not a record
┌───────────────────────────────────────────┐
│ { foo = 1, bar = "ABC" } ⫽ { baz : Bool } │
└───────────────────────────────────────────┘
⇧
Invalid: This is a record type and not a record
┌───────────────────────────────────────────┐
│ { foo = 1, bar = "ABC" } ⫽ < baz : Bool > │
└───────────────────────────────────────────┘
⇧
Invalid: This is a union type and not a record
You tried to combine the following value:
↳ {=}
... which is not a record, but is actually a:
↳ 1
────────────────────────────────────────────────────────────────────────────────
1│ {=} // 1
(stdin):1:1
This bit seems to have some things mixed up:
You tried to combine the following value:
↳ {=}
... which is not a record, but is actually a:
↳ 1
The text was updated successfully, but these errors were encountered:
For `{=} // 1`, we would previously report:
You tried to combine the following value:
↳ {=}
... which is not a record, but is actually a:
↳ 1
Now we report:
You tried to combine the following value:
↳ 1
... which is not a record, but is actually a:
↳ Natural
Fixes#1701.
For `{=} // 1`, we would previously report:
You tried to combine the following value:
↳ {=}
... which is not a record, but is actually a:
↳ 1
Now we report:
You tried to combine the following value:
↳ 1
... which is not a record, but is actually a:
↳ Natural
Fixes#1701.
This bit seems to have some things mixed up:
The text was updated successfully, but these errors were encountered: