[ prelude ] the is linear in its input (#3239)

* [ prelude ] `the` is linear in its input

* [ fix ] eta-expand tests
This commit is contained in:
G. Allais 2024-03-27 15:09:14 +01:00 committed by GitHub
parent 1c186f09a1
commit 2c2aa85048
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ Not x = x -> Void
||| @ a the type to assign
||| @ x the element to get the type
public export %inline
the : (0 a : Type) -> (x : a) -> a
the : (0 a : Type) -> (1 x : a) -> a
the _ x = x
||| Identity function.

View File

@ -1,5 +1,5 @@
chars : List Char -> List Char
chars = the (List Char)
chars cs = the (List Char) cs
singletonRange : chars ['1'..'1'] = chars ['1']
singletonRange = Refl

View File

@ -1,5 +1,5 @@
nats : List Nat -> List Nat
nats = the (List Nat)
nats ns = the (List Nat) ns
singletonRange : nats [1..1] = nats [1]
singletonRange = Refl