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
上定义
半群的实例