mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 12:42:02 +03:00
12 lines
300 B
Idris
12 lines
300 B
Idris
-- Testing that 'with' works under parameters that are implicits
|
|
parameters {0 A : Type} (pred : A -> Bool)
|
|
foo : A -> Bool
|
|
foo x = case pred x of
|
|
True => False
|
|
False => True
|
|
|
|
bar : (x : A) -> not (pred x) = foo x
|
|
bar a with (pred a)
|
|
bar a | True = Refl
|
|
bar a | False = Refl
|