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 / Register
Toggle navigation
Open sidebar
curry
curry-frontend
Commits
557f37ac
Commit
557f37ac
authored
Aug 16, 2018
by
Finn Teegen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in desugaring of record patterns
Fixes
#26
parent
c5719bed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
CHANGELOG.md
CHANGELOG.md
+1
-0
src/Transformations/Desugar.hs
src/Transformations/Desugar.hs
+2
-2
No files found.
CHANGELOG.md
View file @
557f37ac
...
...
@@ -6,6 +6,7 @@ Version 1.0.2 (under development)
*
Fixed bug with wrong type of free variables in the intermediate language.
*
Fixed bug with generated default implementations of nullary class methods.
*
Fixed bug in desugaring of record patterns.
Version 1.0.1
=============
...
...
src/Transformations/Desugar.hs
View file @
557f37ac
...
...
@@ -587,8 +587,8 @@ dsPat p ds (RecordPattern pty c fs) = do
--TODO: Rework
let
(
ls
,
tys
)
=
argumentTypes
(
unpredType
pty
)
c
vEnv
tsMap
=
map
field2Tuple
fs
anonTs
=
map
(
flip
VariablePattern
anonId
.
predType
)
tys
maybeTs
=
map
(
flip
lookup
tsMap
)
ls
anonTs
<-
map
M
(
(
uncurry
VariablePattern
<$>
)
.
freshVar
"_#recpat"
)
tys
let
maybeTs
=
map
(
flip
lookup
tsMap
)
ls
ts
=
zipWith
fromMaybe
anonTs
maybeTs
dsPat
p
ds
(
ConstructorPattern
pty
c
ts
)
dsPat
p
ds
(
TuplePattern
ts
)
=
...
...
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