Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
clean-compiler-and-rts
compiler
Commits
399f2d37
Commit
399f2d37
authored
Nov 16, 2006
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
report an error if an existential type is used
parent
25492b19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
frontend/generics1.icl
frontend/generics1.icl
+9
-6
No files found.
frontend/generics1.icl
View file @
399f2d37
...
...
@@ -379,7 +379,7 @@ where
=
(
GTSVar
tv
,
st
)
convert
{
at_type
=
TB
_}
st
=
(
GTSAppCons
KindConst
[],
st
)
convert
{
at_type
=
type
}
(
modules
,
td_infos
,
heaps
,
error
)
convert
{
at_type
=
type
}
(
modules
,
td_infos
,
heaps
,
error
)
#
error
=
reportError
ident
pos
(
"can not build generic representation for this type"
,
type
)
error
=
(
GTSE
,
(
modules
,
td_infos
,
heaps
,
error
))
...
...
@@ -519,11 +519,14 @@ where
=
(
GTSE
,
(
modules
,
td_infos
,
heaps
,
error
))
build_alt
td_ident
td_pos
cons_def_sym
=:{
ds_index
}
{
ci_cons_info
}
(
modules
,
td_infos
,
heaps
,
error
)
#
({
cons_type
={
st_args
}},
modules
)
=
modules
![
gi_module
].
com_cons_defs
.[
ds_index
]
#
(
args
,
st
)
=
mapSt
(
convertATypeToGenTypeStruct
td_ident
td_pos
predefs
)
st_args
(
modules
,
td_infos
,
heaps
,
error
)
#
prod_type
=
build_prod_type
args
#
type
=
SwitchGenericInfo
(
GTSCons
ci_cons_info
prod_type
)
prod_type
=
(
type
,
st
)
#
({
cons_type
={
st_args
},
cons_exi_vars
},
modules
)
=
modules
![
gi_module
].
com_cons_defs
.[
ds_index
]
|
isEmpty
cons_exi_vars
#
(
args
,
st
)
=
mapSt
(
convertATypeToGenTypeStruct
td_ident
td_pos
predefs
)
st_args
(
modules
,
td_infos
,
heaps
,
error
)
#
prod_type
=
build_prod_type
args
#
type
=
SwitchGenericInfo
(
GTSCons
ci_cons_info
prod_type
)
prod_type
=
(
type
,
st
)
#
error
=
reportError
td_ident
td_pos
"cannot build a generic representation of an existential type"
error
=
(
GTSE
,
(
modules
,
td_infos
,
heaps
,
error
))
build_prod_type
::
[
GenTypeStruct
]
->
GenTypeStruct
build_prod_type
types
...
...
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