mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 15:07:37 +03:00
If we know the types of a
& b
start searching.
This is helpful when defining auto-implicits of the form: pairEqF : DecEq a => (thisX, x, y : a) -> {prfRefl : Equal x thisX} -> (prfEq : decEq x thisX = Yes prfRefl) => Pair a a pairEqF thisX x y {prfRefl} {prfEq} = MkPair x y before auto-implicit search would fail to find `Refl` for `prfRefl`. With this fix the solution is found. This fix means we can avoid having to write the following. pairEqF' : DecEq a => (thisX, x, y : a) -> (prfEq : decEq x thisX = Yes (the (Equal x x) Refl)) => Pair a a pairEqF' thisX x y {prfEq} = MkPair x y
This commit is contained in:
parent
fcbfcf6fe2
commit
5774a9c6ae
@ -110,6 +110,7 @@ data Void : Type where
|
||||
|
||||
public export
|
||||
data Equal : forall a, b . a -> b -> Type where
|
||||
[search a b]
|
||||
Refl : {0 x : a} -> Equal x x
|
||||
|
||||
%name Equal prf
|
||||
|
Loading…
Reference in New Issue
Block a user