Idris2-boot/tests/idris2/interface010/Dep.idr
Edwin Brady 8e9655dd9b Unbound implicits are invertible in terms
Just like all other pi-bound things, if m is an unbound implicit and we
have m ?x = m y as a unification problem, we can conclude ?x = y because
it has to be true for all ms.

This was implemented in Blodwen but I hadn't got around to it yet for
Idris2... fortunately it's a bit easier in Idris2!

Fixes #44
2019-07-26 12:27:54 +01:00

8 lines
194 B
Idris

module Dep
interface Monad m => FooBar m where
Foo : {0 a : Type} -> a -> m a -> Type
Bar : {0 A : Type} -> m A -> Type
foo : {0 A : Type} -> (x : A) -> (ma : m A) -> Foo x ma -> Bar ma