Idris2/tests/idris2/reg045/withparams.idr
Edwin Brady 1dbc9a7143 Fix 'with' under implicit parameters
The 'with' type and application need to treat the parameters with the
same plicity, but the application has just always treated them as
explicit since it never looked. It's easiest just to make them all
explicit, since this isn't a user visible type. Fixes #1695.
2021-07-14 14:51:52 +01:00

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