mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-18 08:42:11 +03:00
[ prelude ] the
is linear in its input (#3239)
* [ prelude ] `the` is linear in its input * [ fix ] eta-expand tests
This commit is contained in:
parent
1c186f09a1
commit
2c2aa85048
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user