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
5ee09622
Commit
5ee09622
authored
Nov 21, 2017
by
John van Groningen
Browse files
implement import of newtype constructor
parent
06d15acb
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/checksupport.icl
View file @
5ee09622
...
...
@@ -132,13 +132,14 @@ retrieveGlobalDefinition {ste_kind,ste_def_level,ste_index} requ_kind mod_index
getBelongingSymbols
::
!
Declaration
!
v
:{#
DclModule
}
->
(!
BelongingSymbols
,
!
v
:{#
DclModule
})
getBelongingSymbols
(
Declaration
{
decl_kind
=
STE_Imported
STE_Type
def_mod_index
,
decl_index
})
dcl_modules
#
({
td_rhs
},
dcl_modules
)
=
dcl_modules
![
def_mod_index
].
dcl_common
.
com_type_defs
.[
decl_index
]
#
(
td_rhs
,
dcl_modules
)
=
dcl_modules
![
def_mod_index
].
dcl_common
.
com_type_defs
.[
decl_index
].
td_rhs
=
case
td_rhs
of
AlgType
constructors
->
(
BS_Constructors
constructors
,
dcl_modules
)
RecordType
{
rt_fields
}
->
(
BS_Fields
rt_fields
,
dcl_modules
)
NewType
constructor
->
(
BS_Constructors
[
constructor
],
dcl_modules
)
_
->
(
BS_Nothing
,
dcl_modules
)
getBelongingSymbols
(
Declaration
{
decl_kind
=
STE_Imported
STE_Class
def_mod_index
,
decl_index
})
dcl_modules
...
...
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