mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 04:33:45 +03:00
[ base ] Implement Uninhabited for impossible Pointwise equalities
This commit is contained in:
parent
f58a96e420
commit
c2dd824c58
@ -135,6 +135,7 @@
|
||||
which takes a witness of `finToNat k = finToNat l` and proves `k ~~~ l`.
|
||||
* Drop first argument (path to the `node` executable) from `System.getArgs` on
|
||||
the Node.js backend to make it consistent with other backends.
|
||||
* Adds `Uninhabited` instances for `FZ ~~~ FS k` and `FS k ~~~ FZ`.
|
||||
|
||||
#### Test
|
||||
|
||||
|
@ -304,6 +304,16 @@ namespace Equality
|
||||
(~~~) : Fin m -> Fin n -> Type
|
||||
(~~~) = Pointwise
|
||||
|
||||
export
|
||||
Uninhabited (FS k ~~~ FZ) where
|
||||
uninhabited FZ impossible
|
||||
uninhabited (FS _) impossible
|
||||
|
||||
export
|
||||
Uninhabited (FZ ~~~ FS k) where
|
||||
uninhabited FZ impossible
|
||||
uninhabited (FS _) impossible
|
||||
|
||||
||| Pointwise equality is reflexive
|
||||
export
|
||||
reflexive : {k : Fin m} -> k ~~~ k
|
||||
|
Loading…
Reference in New Issue
Block a user