mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +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
|