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
6c936a75
Commit
6c936a75
authored
Oct 11, 2001
by
Sjaak Smetsers
Browse files
Bug fix: type attributes of constructor variables are treated (more) uniformly
parent
68570cb7
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/checktypes.icl
View file @
6c936a75
...
...
@@ -561,11 +561,17 @@ checkOpenAType mod_index scope dem_attr type=:{at_type = TArrow1 arg_type, at_at
(
new_attr
,
oti
,
cs
)
=
newAttribute
dem_attr
"TArrow1"
at_attribute
oti
cs
=
({
type
&
at_type
=
TArrow1
arg_type
,
at_attribute
=
new_attr
},
(
ots
,
oti
,
cs
))
//..AA
/*
checkOpenAType mod_index scope dem_attr type=:{at_type = CV tv :@: types, at_attribute} (ots, oti, cs)
# (cons_var, _, (oti, cs)) = checkTypeVar scope DAK_None tv TA_Multi (oti, cs)
(types, (ots, oti, cs)) = mapSt (checkOpenAType mod_index scope DAK_None) types (ots, oti, cs)
(new_attr, oti, cs) = newAttribute dem_attr ":@:" at_attribute oti cs
= ({ type & at_type = CV cons_var :@: types, at_attribute = new_attr }, (ots, oti, cs))
*/
checkOpenAType
mod_index
scope
dem_attr
type
=:{
at_type
=
CV
tv
:@:
types
,
at_attribute
}
(
ots
,
oti
,
cs
)
#
(
cons_var
,
var_attr
,
(
oti
,
cs
))
=
checkTypeVar
scope
dem_attr
tv
at_attribute
(
oti
,
cs
)
(
types
,
(
ots
,
oti
,
cs
))
=
mapSt
(
checkOpenAType
mod_index
scope
DAK_None
)
types
(
ots
,
oti
,
cs
)
=
({
type
&
at_type
=
CV
cons_var
:@:
types
,
at_attribute
=
var_attr
},
(
ots
,
oti
,
cs
))
checkOpenAType
mod_index
scope
dem_attr
atype
=:{
at_type
=
TFA
vars
type
,
at_attribute
}
(
ots
,
oti
,
cs
)
#
(
vars
,
(
oti
,
cs
))
=
mapSt
add_universal_var
vars
(
oti
,
cs
)
(
checked_type
,
(
ots
,
oti
,
cs
))
=
checkOpenAType
mod_index
cRankTwoScope
dem_attr
{
atype
&
at_type
=
type
}
(
ots
,
oti
,
cs
)
...
...
Write
Preview
Markdown
is supported
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