The empty type. It has no constructors.
Use Empty.elim in contexts where a value of type Empty is in scope.
空类型 Empty 表示不可能的值。
它是一个没有任何构造函数的归纳类型。
虽然普通类型 Unit(具有不带参数的单个构造函数)可用于对结果不想要或无趣的计算进行建模,但 Empty 可用于根本不可能进行计算的情况。
使用 Empty 实例化多态类型可以将其某些构造函数(具有相应类型的参数的构造函数)标记为不可能; this can rule out certain code paths that are not desired.
类型为 Empty 的术语的存在表示已到达不可能的代码路径。
由于缺乏构造函数,这种类型永远不会有值。
在不可能的代码路径上,没有理由编写更多代码;函数 Empty.elim 可用于逃离不可能的路径。
The empty type. It has no constructors.
Use Empty.elim in contexts where a value of type Empty is in scope.
Empty.elim : Empty → C says that a value of any type can be constructed from
Empty. This can be thought of as a compiler-checked assertion that a code path is unreachable.
PEmpty.elim : Empty → C says that a value of any type can be constructed from
PEmpty. This can be thought of as a compiler-checked assertion that a code path is unreachable.