Commit 6d36d8d2 authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl
Browse files

fix type arity test in module generics1

parent f9fdbcd1
......@@ -464,7 +464,7 @@ where
# error = reportError predefined_idents.[PD_GenericBimap].id_name pos ("can not build generic representation for this type", type) error
= (GTSE, (modules, td_infos, heaps, error))
convert_type_app {type_index=type_index=:{glob_module,glob_object},type_arity} attr args (modules, td_infos, heaps, error)
convert_type_app {type_index=type_index=:{glob_module,glob_object}} attr args (modules, td_infos, heaps, error)
# (type_def, modules) = modules![glob_module].com_type_defs.[glob_object]
= case type_def.td_rhs of
SynType atype
......@@ -478,11 +478,11 @@ where
-> (GTSAppCons KindConst [], (modules, td_infos, heaps, error))
AlgType alts
# n_args = length args
| n_args>0 && type_arity==n_args
| n_args>0 && type_def.td_arity==n_args
# (can_generate_bimap_to_or_from,modules,heaps)
= can_generate_bimap_to_or_from_for_this_type type_def.td_args glob_module alts modules heaps
| can_generate_bimap_to_or_from
#! (tdi_kinds,td_infos) = td_infos![glob_module,glob_object].tdi_kinds
#! (tdi_kinds,td_infos) = td_infos![glob_module,glob_object].tdi_kinds
#! (args, st) = convert_args args (modules, td_infos, heaps, error)
-> (GTSAppConsSimpleType {gi_module=type_index.glob_module,gi_index=type_index.glob_object} (KindArrow tdi_kinds) args, st)
-> convert_type_app_to_GTSAppCons glob_module glob_object args modules td_infos heaps error
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment