Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Cloogle
Cloogle
Commits
0f167708
Verified
Commit
0f167708
authored
May 07, 2018
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more fixes for record fields in Idents
parent
926a918c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Idents.icl
Idents.icl
+5
-3
No files found.
Idents.icl
View file @
0f167708
...
...
@@ -28,6 +28,8 @@ where
,
record_fields
=
union
a
.
record_fields
b
.
record_fields
}
instance
idents
Idents
where
idents
_
id
=
id
instance
idents
[
t
]
|
idents
t
where
idents
c
xs
=
removeLocalGlobals
...
...
@@ -79,12 +81,12 @@ where
PE_List
pes
->
idents
c
pes
PE_Ident
id
->
idents
c
id
PE_Basic
b
->
idents
c
b
PE_Bound
_
->
zero
PE_Bound
b
->
src
+
idents
c
b
.
bind_dst
+
{
zero
&
locals
=
src
.
record_fields
}
with
src
=
idents
c
b
.
bind_src
PE_Lambda
_
args
rhs
_
->
noLocals
(
idents
ICPattern
args
+
idents
ICExpression
rhs
)
PE_Tuple
es
->
idents
c
es
PE_Record
init
_
fields
->
idents
c
init
+
idents
c
[
f
.
bind_dst
\\
f
<-
fields
]
+
idents
c
[
f
.
bind_src
\\
f
<-
fields
]
PE_ArrayPattern
_
->
abort
"idents PE_ArrayPattern
\n
"
//(PE_ArrayPattern ![ElemAssignment]
PE_ArrayPattern
eas
->
foldr
(\
x
->
(+)
(
idents
c
x
.
bind_src
+
idents
c
x
.
bind_dst
))
zero
eas
PE_UpdateComprehension
base
(
PE_Update
_
sels
new
)
_
qs
->
noLocals
(
idents
ICExpression
[
base
,
new
]
+
idents
ICExpression
sels
+
idents
ICPattern
qs
)
PE_ArrayDenot
_
es
->
idents
c
es
PE_Selection
_
e
s
->
idents
c
e
+
idents
c
s
...
...
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