Interface Idris-动态定义接口
有没有一种方法可以“动态”构建接口的实现? 我有一些代码看起来像Interface Idris-动态定义接口,interface,record,idris,Interface,Record,Idris,有没有一种方法可以“动态”构建接口的实现? 我有一些代码看起来像 record MySemigroup where constructor MkMySemigroup set : Type op : set -> set -> set mySemigroupIsSemigroup : (s : MySemigroup) -> Semigroup (set s) mySemigroupIsSemigroup s = ?hole 我想使用ops在sets上定义
record MySemigroup where
constructor MkMySemigroup
set : Type
op : set -> set -> set
mySemigroupIsSemigroup : (s : MySemigroup) -> Semigroup (set s)
mySemigroupIsSemigroup s = ?hole
我想使用ops
在sets
上定义半群的实例