<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Simon Jakobi pushed to branch wip/sjakobi/foldl-unionManyUniqDSets
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/32b6005dd052b02313d00e7824ca3ed2e70d8085">32b6005d</a></strong>
<div>
<span>by Simon Jakobi</span>
<i>at 2020-04-05T01:56:55+02:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Use foldl' in unionManyUniqDSets
</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class="file-stats">
<a href="#dd1734ed93e4694f773dd468a1855524e6bbca0f">
compiler/GHC/Types/Unique/DSet.hs
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id="dd1734ed93e4694f773dd468a1855524e6bbca0f">
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/32b6005dd052b02313d00e7824ca3ed2e70d8085#dd1734ed93e4694f773dd468a1855524e6bbca0f"><strong>compiler/GHC/Types/Unique/DSet.hs</strong></a>
<hr>
<table class="code white" style="font-family: monospace; font-size: 90%;" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder match" id="" style="line-height: 1.6;">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="81" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="diff-line-num unfold js-unfold new_line" data-linenumber="81" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="line_content match " style="padding-left: 0.5em; padding-right: 0.5em; color: rgba(0,0,0,0.3);" bgcolor="#fafafa">@@ -81,8 +81,8 @@ unionUniqDSets :: UniqDSet a -> UniqDSet a -> UniqDSet a</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="81" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
81
</td>
<td class="diff-line-num new_line" data-linenumber="81" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
81
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC81" class="line" lang="haskell"><span class="n" style="color: #333;">unionUniqDSets</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">s</span><span class="p">)</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">t</span><span class="p">)</span> <span class="o" style="font-weight: 600;">=</span> <span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="p">(</span><span class="n" style="color: #333;">plusUDFM</span> <span class="n" style="color: #333;">s</span> <span class="n" style="color: #333;">t</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
82
</td>
<td class="diff-line-num new_line" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
82
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC82" class="line" lang="haskell"></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="83" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
83
</td>
<td class="diff-line-num new_line" data-linenumber="83" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
83
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC83" class="line" lang="haskell"><span class="n" style="color: #333;">unionManyUniqDSets</span> <span class="o" style="font-weight: 600;">::</span> <span class="p">[</span><span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">a</span><span class="p">]</span> <span class="o" style="font-weight: 600;">-></span> <span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">a</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="" style="line-height: 1.6;">
<td class="diff-line-num old old_line" data-linenumber="84" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
84
</td>
<td class="diff-line-num new_line old" data-linenumber="84" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC84" class="line" lang="haskell"><span class="n" style="color: #333;">unionManyUniqDSets</span> <span class="kt" style="color: #458; font-weight: 600;">[]</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">emptyUniqDSet</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="" style="line-height: 1.6;">
<td class="diff-line-num old old_line" data-linenumber="85" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
85
</td>
<td class="diff-line-num new_line old" data-linenumber="84" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC85" class="line" lang="haskell"><span class="n" style="color: #333;">unionManyUniqDSets</span> <span class="n" style="color: #333;"><span class="idiff left">sets</span></span><span class="idiff"> </span><span class="o" style="font-weight: 600;"><span class="idiff">=</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff">foldr1</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff">unionUniqDSets</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff right">set</span>s</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="86" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="84" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
84
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC84" class="line" lang="haskell"><span class="n" style="color: #333;">unionManyUniqDSets</span> <span class="kt" style="color: #458; font-weight: 600;">[]</span> <span class="idiff left right">    </span><span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">emptyUniqDSet</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="86" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="85" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
85
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC85" class="line" lang="haskell"><span class="n" style="color: #333;">unionManyUniqDSets</span> <span class="p"><span class="idiff left">(</span></span><span class="n" style="color: #333;"><span class="idiff">x</span></span><span class="o" style="font-weight: 600;"><span class="idiff">:</span></span><span class="n" style="color: #333;"><span class="idiff">xs</span></span><span class="p"><span class="idiff">)</span></span><span class="idiff"> </span><span class="o" style="font-weight: 600;"><span class="idiff">=</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff">foldl'</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff">unionUniqDSets</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff">x</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff right">x</span>s</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="86" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
86
</td>
<td class="diff-line-num new_line" data-linenumber="86" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
86
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC86" class="line" lang="haskell"></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="87" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
87
</td>
<td class="diff-line-num new_line" data-linenumber="87" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
87
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC87" class="line" lang="haskell"><span class="n" style="color: #333;">minusUniqDSet</span> <span class="o" style="font-weight: 600;">::</span> <span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">a</span> <span class="o" style="font-weight: 600;">-></span> <span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">a</span> <span class="o" style="font-weight: 600;">-></span> <span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">a</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="88" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
88
</td>
<td class="diff-line-num new_line" data-linenumber="88" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
88
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC88" class="line" lang="haskell"><span class="n" style="color: #333;">minusUniqDSet</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">s</span><span class="p">)</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="n" style="color: #333;">t</span><span class="p">)</span> <span class="o" style="font-weight: 600;">=</span> <span class="kt" style="color: #458; font-weight: 600;">UniqDSet</span> <span class="p">(</span><span class="n" style="color: #333;">minusUDFM</span> <span class="n" style="color: #333;">s</span> <span class="n" style="color: #333;">t</span><span class="p">)</span></span>
</pre>
</td>
</tr>

</table>
<br>
</li>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/32b6005dd052b02313d00e7824ca3ed2e70d8085">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.haskell.org/ghc/ghc/-/commit/32b6005dd052b02313d00e7824ca3ed2e70d8085"}}</script>


</p>
</div>
</body>
</html>