<interactive>:1:6: error:
• Key 'isEnabled' does not exist in the following schema:
'[ '("id", 'Data.Aeson.Schema.SchemaInt),
'("name", 'Data.Aeson.Schema.SchemaText),
'("age",
'Data.Aeson.Schema.SchemaMaybe 'Data.Aeson.Schema.SchemaInt),
'("enabled", 'Data.Aeson.Schema.SchemaBool),
'("groups",
'Data.Aeson.Schema.SchemaMaybe
('Data.Aeson.Schema.SchemaList
('Data.Aeson.Schema.SchemaObject
'[ '("id", 'Data.Aeson.Schema.SchemaInt),
'("name", 'Data.Aeson.Schema.SchemaText)])))]
• In the second argument of ‘(.)’, namely ‘getKey @"isEnabled"’
In the first argument of ‘(<$:>)’, namely
‘(id . getKey @"isEnabled")’
In the first argument of ‘(.)’, namely
‘((id . getKey @"isEnabled") <$:>)’
It would be nice to pretty print the schema in the error message, e.g.
<interactive>:1:6: error:
• Key 'isEnabled' does not exist in the following schema:
{ id: Int,
name: Text,
age: Maybe Int,
enabled: Bool,
groups: Maybe List { id: Int, name: Text },
}
• In the second argument of ‘(.)’, namely ‘getKey @"isEnabled"’
In the first argument of ‘(<$:>)’, namely
‘(id . getKey @"isEnabled")’
In the first argument of ‘(.)’, namely
‘((id . getKey @"isEnabled") <$:>)’
From the README:
It would be nice to pretty print the schema in the error message, e.g.