Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
6d36d8d2
Commit
6d36d8d2
authored
Sep 17, 2019
by
johnvg@science.ru.nl
Browse files
fix type arity test in module generics1
parent
f9fdbcd1
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/generics1.icl
View file @
6d36d8d2
...
...
@@ -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,7 +478,7 @@ 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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment