mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-19 10:51:35 +03:00
7825d216c0
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
14 lines
265 B
Idris
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
|