feat: polymorphic type class members

This commit is contained in:
Shunsuke Shibayama 2023-07-14 01:53:06 +09:00
parent f65e3acaf3
commit e3b479ebf7
12 changed files with 247 additions and 48 deletions

View file

@ -1181,7 +1181,7 @@ impl Context {
);
/* Array */
let mut array_ =
Self::builtin_poly_class(ARRAY, vec![PS::t_nd(TY_T), PS::named_nd(TY_N, Nat)], 10);
Self::builtin_poly_class(ARRAY, vec![PS::t_nd(TY_T), PS::default(TY_N, Nat)], 10);
array_.register_superclass(mono(GENERIC_ARRAY), &generic_array);
array_
.register_marker_trait(self, poly(OUTPUT, vec![ty_tp(T.clone())]))