User : { Type : Type , default : { mastodon : βˆ€(A : Type) β†’ Optional A, name : Text } } Error: Expression doesn't match annotation { + preferred_language : … , … } Explanation: You can annotate an expression with its type or kind using the ❰:❱ symbol, like this: β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”‚ x : t β”‚ ❰x❱ is an expression and ❰t❱ is the annotated type or kind of ❰x❱ β””β”€β”€β”€β”€β”€β”€β”€β”˜ The type checker verifies that the expression's type or kind matches the provided annotation For example, all of the following are valid annotations that the type checker accepts: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ 1 : Natural β”‚ ❰1❱ is an expression that has type ❰Natural❱, so the type β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ checker accepts the annotation β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Natural/even 2 : Bool β”‚ ❰Natural/even 2❱ has type ❰Bool❱, so the type β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ checker accepts the annotation β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ List : Type β†’ Type β”‚ ❰List❱ is an expression that has kind ❰Type β†’ Type❱, β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ so the type checker accepts the annotation β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ List Text : Type β”‚ ❰List Text❱ is an expression that has kind ❰Type❱, so β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ the type checker accepts the annotation However, the following annotations are not valid and the type checker will reject them: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ 1 : Text β”‚ The type checker rejects this because ❰1❱ does not have type β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ❰Text❱ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ List : Type β”‚ ❰List❱ does not have kind ❰Type❱ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Some common reasons why you might get this error: ● The Haskell Dhall interpreter implicitly inserts a top-level annotation matching the expected type For example, if you run the following Haskell code: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ >>> input auto "1" :: IO Text β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ... then the interpreter will actually type check the following annotated expression: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ 1 : Text β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ... and then type-checking will fail ──────────────────────────────────────────────────────────────────────────────── You or the interpreter annotated this expression: ↳ User.default β«½ { name = "Cadey" , mastodon = Some "@cadey@mst3k.interlinked.me" , preferred_language = "en-US" } ... with this type or kind: ↳ { mastodon : Optional Text, name : Text } ... but the inferred type or kind of the expression is actually: ↳ { mastodon : Optional Text, name : Text, preferred_language : Text } ──────────────────────────────────────────────────────────────────────────────── 4β”‚ User::{ name = "Cadey", mastodon = Some "@cadey@mst3k.interlinked.me", 5β”‚ preferred_language = "en-US" } example.dhall:4:9