{
"Bool" => Builtins[:Type],
"Type" => Builtins[:Kind],
"Kind" => Builtins[:Sort],
"Natural" => Builtins[:Type],
"Integer" => Builtins[:Type],
"Double" => Builtins[:Type],
"Text" => Builtins[:Type],
"List" => Dhall::Forall.of_arguments(
Builtins[:Type],
body: Builtins[:Type]
),
"Optional" => Dhall::Forall.of_arguments(
Builtins[:Type],
body: Builtins[:Type]
),
"None" => Dhall::Forall.new(
var: "A",
type: Builtins[:Type],
body: Dhall::Application.new(
function: Builtins[:Optional],
argument: Dhall::Variable["A"]
)
),
"Natural/build" => Dhall::Forall.of_arguments(
Dhall::Forall.new(
var: "natural",
type: Builtins[:Type],
body: Dhall::Forall.new(
var: "succ",
type: Dhall::Forall.of_arguments(
Dhall::Variable["natural"],
body: Dhall::Variable["natural"]
),
body: Dhall::Forall.new(
var: "zero",
type: Dhall::Variable["natural"],
body: Dhall::Variable["natural"]
)
)
),
body: Builtins[:Natural]
),
"Natural/fold" => Dhall::Forall.of_arguments(
Builtins[:Natural],
body: Dhall::Forall.new(
var: "natural",
type: Builtins[:Type],
body: Dhall::Forall.new(
var: "succ",
type: Dhall::Forall.of_arguments(
Dhall::Variable["natural"],
body: Dhall::Variable["natural"]
),
body: Dhall::Forall.new(
var: "zero",
type: Dhall::Variable["natural"],
body: Dhall::Variable["natural"]
)
)
)
),
"Natural/subtract" => Dhall::Forall.of_arguments(
Builtins[:Natural],
Builtins[:Natural],
body: Builtins[:Natural]
),
"Natural/isZero" => Dhall::Forall.of_arguments(
Builtins[:Natural],
body: Builtins[:Bool]
),
"Natural/even" => Dhall::Forall.of_arguments(
Builtins[:Natural],
body: Builtins[:Bool]
),
"Natural/odd" => Dhall::Forall.of_arguments(
Builtins[:Natural],
body: Builtins[:Bool]
),
"Natural/toInteger" => Dhall::Forall.of_arguments(
Builtins[:Natural],
body: Builtins[:Integer]
),
"Natural/show" => Dhall::Forall.of_arguments(
Builtins[:Natural],
body: Builtins[:Text]
),
"Text/show" => Dhall::Forall.of_arguments(
Builtins[:Text],
body: Builtins[:Text]
),
"List/build" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Forall.new(
var: "list",
type: Builtins[:Type],
body: Dhall::Forall.new(
var: "cons",
type: Dhall::Forall.of_arguments(
Dhall::Variable["a"],
Dhall::Variable["list"],
body: Dhall::Variable["list"]
),
body: Dhall::Forall.new(
var: "nil",
type: Dhall::Variable["list"],
body: Dhall::Variable["list"]
)
)
),
body: Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::Variable["a"]
)
)
),
"List/fold" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::Variable["a"]
),
body: Dhall::Forall.new(
var: "list",
type: Builtins[:Type],
body: Dhall::Forall.new(
var: "cons",
type: Dhall::Forall.of_arguments(
Dhall::Variable["a"],
Dhall::Variable["list"],
body: Dhall::Variable["list"]
),
body: Dhall::Forall.new(
var: "nil",
type: Dhall::Variable["list"],
body: Dhall::Variable["list"]
)
)
)
)
),
"List/length" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::Variable["a"]
),
body: Builtins[:Natural]
)
),
"List/head" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::Variable["a"]
),
body: Dhall::Application.new(
function: Builtins[:Optional],
argument: Dhall::Variable["a"]
)
)
),
"List/last" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::Variable["a"]
),
body: Dhall::Application.new(
function: Builtins[:Optional],
argument: Dhall::Variable["a"]
)
)
),
"List/indexed" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::Variable["a"]
),
body: Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::RecordType.new(
record: {
"index" => Builtins[:Natural],
"value" => Dhall::Variable["a"]
}
)
)
)
),
"List/reverse" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::Variable["a"]
),
body: Dhall::Application.new(
function: Builtins[:List],
argument: Dhall::Variable["a"]
)
)
),
"Optional/fold" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Application.new(
function: Builtins[:Optional],
argument: Dhall::Variable["a"]
),
body: Dhall::Forall.new(
var: "optional",
type: Builtins[:Type],
body: Dhall::Forall.new(
var: "just",
type: Dhall::Forall.of_arguments(
Dhall::Variable["a"],
body: Dhall::Variable["optional"]
),
body: Dhall::Forall.new(
var: "nothing",
type: Dhall::Variable["optional"],
body: Dhall::Variable["optional"]
)
)
)
)
),
"Optional/build" => Dhall::Forall.new(
var: "a",
type: Builtins[:Type],
body: Dhall::Forall.of_arguments(
Dhall::Forall.new(
var: "optional",
type: Builtins[:Type],
body: Dhall::Forall.new(
var: "just",
type: Dhall::Forall.of_arguments(
Dhall::Variable["a"],
body: Dhall::Variable["optional"]
),
body: Dhall::Forall.new(
var: "nothing",
type: Dhall::Variable["optional"],
body: Dhall::Variable["optional"]
)
)
),
body: Dhall::Application.new(
function: Builtins[:Optional],
argument: Dhall::Variable["a"]
)
)
),
"Integer/show" => Dhall::Forall.of_arguments(
Builtins[:Integer],
body: Builtins[:Text]
),
"Integer/toDouble" => Dhall::Forall.of_arguments(
Builtins[:Integer],
body: Builtins[:Double]
),
"Double/show" => Dhall::Forall.of_arguments(
Builtins[:Double],
body: Builtins[:Text]
)
}.freeze