Idris2-boot/tests/idris2/interface014/DepInt.idr
Edwin Brady 7825d216c0 Push constraint name into default method impls
If a default method implementation refers to another method in the
interface, it's going to be one from the interface being defined, so
push it through explicitly.
This is only going to be guaranteed to be the case for default method
implementations - we can't assume anything for other implementations.
Fixes #77
2019-09-20 19:01:07 +01:00

14 lines
265 B
Idris

import Control.Monad.Identity
public export
interface Foo (sA : Type) where
A : Type
Elem : A -> sA -> Type
Empty : sA -> Type
Empty as = (a : A) -> Not (Elem a as)
public export
implementation Foo (Identity Bool) where
A = Bool
Elem x (Id y) = x = y