Skip to content
GitLab
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
0773c0f5
Commit
0773c0f5
authored
Jun 10, 2002
by
Martijn Vervoort
Browse files
- bug fix:types scopes
parent
87d0e454
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/convertDynamics.icl
View file @
0773c0f5
...
...
@@ -66,6 +66,7 @@ F a b = b
//write_tcl_file :: !Int {#DclModule} CommonDefs !*File [String] -> (.Bool,.File)
//write_tcl_file :: !Int {#DclModule} CommonDefs !*File [String] _ _ !*TypeHeaps !*PredefinedSymbols -> (.Bool,.File,!*TypeHeaps,!*PredefinedSymbols)
// write_tcl_file ({#},{!},{#},[{#Char}],CommonDefs,{#}) :: !.Int !{#y:DclModule} CommonDefs !*File [{#Char}] !{!x:GlobalTCType} {#w:Bool} !*TypeHeaps !{#v:PredefinedSymbol} -> (.Bool,.File,.TypeHeaps,{#PredefinedSymbol}), [u <=
write_tcl_file
main_dcl_module_n
dcl_mods
=:{[
main_dcl_module_n
]
=
main_dcl_module
}
common_defs
tcl_file
directly_imported_dcl_modules
global_type_instances
ci_type_constructor_used_in_dynamic_patterns
type_heaps
predefined_symbols
#
(
pre_mod
,
predefined_symbols
)
=
predefined_symbols
![
PD_PredefinedModule
]
#
write_type_info_state2
...
...
@@ -87,6 +88,12 @@ write_tcl_file main_dcl_module_n dcl_mods=:{[main_dcl_module_n] = main_dcl_modul
=
collect_type_constructors_in_dynamic_patterns
0
(
size
global_type_instances
)
[]
#!
(
tcl_file
,
write_type_info_state
)
=
write_type_info
type_constructors_in_dynamic_patterns
tcl_file
write_type_info_state
#!
(
tcl_file
,
write_type_info_state
)
=
write_type_info
(
help_20_compiler
{
dcl_name
.
id_name
\\
{
dcl_name
}
<-:
dcl_mods
})
tcl_file
write_type_info_state
with
help_20_compiler
::
{#{#
Char
}}
->
{#{#
Char
}}
help_20_compiler
l
=
l
#!
(
type_heaps
,_)
=
f
write_type_info_state
;
...
...
@@ -95,7 +102,7 @@ write_tcl_file main_dcl_module_n dcl_mods=:{[main_dcl_module_n] = main_dcl_modul
=
fwritei
(
size
main_dcl_module
.
dcl_common
.
com_type_defs
)
tcl_file
#!
tcl_file
=
fwritei
(
size
main_dcl_module
.
dcl_common
.
com_cons_defs
)
tcl_file
=
(
True
,
tcl_file
,
type_heaps
,
predefined_symbols
)
where
collect_type_constructors_in_dynamic_patterns
::
!
Int
!
Int
[
TypeSymbIdent
]
->
[
TypeSymbIdent
]
...
...
frontend/type_io.icl
View file @
0773c0f5
...
...
@@ -415,7 +415,7 @@ where
instance
WriteTypeInfo
TypeSymbIdent
where
write_type_info
{
type_name
,
type_arity
,
type_index
={
glob_module
}}
tcl_file
wtis
=:{
wtis_predefined_module_def
}
write_type_info
tsi
=:
{
type_name
,
type_arity
,
type_index
={
glob_module
}}
tcl_file
wtis
=:{
wtis_predefined_module_def
}
#
is_type_without_definition
=
glob_module
==
wtis_predefined_module_def
#
tcl_file
...
...
@@ -425,6 +425,17 @@ where
=
write_type_info
type_name
tcl_file
wtis
#
(
tcl_file
,
wtis
)
=
write_type_info
type_arity
tcl_file
wtis
#
(
tcl_file
,
wtis
)
=
write_type_info
tsi
.
type_index
tcl_file
wtis
=
(
tcl_file
,
wtis
)
instance
WriteTypeInfo
(
Global
object
)
|
WriteTypeInfo
object
where
write_type_info
{
glob_object
,
glob_module
}
tcl_file
wtis
#
(
tcl_file
,
wtis
)
=
write_type_info
glob_object
tcl_file
wtis
#
(
tcl_file
,
wtis
)
=
write_type_info
glob_module
tcl_file
wtis
=
(
tcl_file
,
wtis
)
// basic and structural write_type_info's
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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