summaryrefslogtreecommitdiff
path: root/dhall/src/errors/InvalidFieldType.txt
blob: 4f76a64ac745f74b28eea3806c6b2d114e4d8081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Explanation: Every record type documents the type of each field, like this:

    ┌──────────────────────────────────────────────┐
    │ { foo : Integer, bar : Integer, baz : Text } │
    └──────────────────────────────────────────────┘

However, fields cannot be annotated with expressions other than types

For example, these record types are $_NOT valid:


    ┌────────────────────────────┐
    │ { foo : Integer, bar : 1 } │
    └────────────────────────────┘
                             ⇧
                             ❰1❱ is an ❰Integer❱ and not a ❰Type❱


    ┌───────────────────────────────┐
    │ { foo : Integer, bar : Type } │
    └───────────────────────────────┘
                             ⇧
                             ❰Type❱ is a ❰Kind❱ and not a ❰Type❱


You provided a record type with a key named:

↳ $txt0

... annotated with the following expression:

↳ $txt1

... which is not a type