<!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>
Ben Gamari pushed to branch ghc-8.8
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/605869c7b776ce6071a31ff447998b081e0354ed">605869c7</a></strong>
<div>
<span>by Vladislav Zavialov</span>
<i>at 2019-06-03T21:28:12Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix optSemi type in Parser.y
The definition of 'optSemi' claimed it had type
([Located a],Bool)
Note that its production actually returns ([Located Token],Bool):
: ';' { ([$1],True) } -- $1 :: Located Token
Due to an infelicity in the implementation of 'happy -c', it effectively
resulted in 'unsafeCoerce :: Token -> a'.
See https://github.com/simonmar/happy/pull/134
If any consumer of 'optSemi' tried to instantiate 'a' to something not
representationally equal to 'Token', they would experience a segfault.
In addition to that, this definition made it impossible to compile Parser.y
without the -c flag (as it's reliant on this bug to cast 'Token' to 'forall
a. a').
</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class="file-stats">
<a href="#a9d23eb447426d7f3469127262985af461dfad78">
compiler/parser/Parser.y
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id="a9d23eb447426d7f3469127262985af461dfad78">
<a href="https://gitlab.haskell.org/ghc/ghc/commit/605869c7b776ce6071a31ff447998b081e0354ed#a9d23eb447426d7f3469127262985af461dfad78"><strong>compiler/parser/Parser.y</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 old" id="" style="line-height: 1.6;">
<td class="diff-line-num old old_line" data-linenumber="1" 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">
1
</td>
<td class="diff-line-num new_line old" data-linenumber="1" 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="LC1" 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="2" 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">
2
</td>
<td class="diff-line-num new_line" data-linenumber="1" 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">
1
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC1" class="line" lang="haskell"><span class="c1" style="color: #998; font-style: italic;">-- -*-haskell-*-</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="3" 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">
3
</td>
<td class="diff-line-num new_line" data-linenumber="2" 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">
2
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC2" class="line" lang="haskell"><span class="c1" style="color: #998; font-style: italic;">-- ---------------------------------------------------------------------------</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="4" 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">
4
</td>
<td class="diff-line-num new_line" data-linenumber="3" 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">
3
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC3" class="line" lang="haskell"><span class="c1" style="color: #998; font-style: italic;">-- (c) The University of Glasgow 1997-2003</span></span>
</pre>
</td>
</tr>
<tr class="line_holder match" id="" style="line-height: 1.6;">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="2586" 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="2585" 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">@@ -2586,7 +2585,7 @@ exp10 :: { LHsExpr GhcPs }</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="2586" 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">
2586
</td>
<td class="diff-line-num new_line" data-linenumber="2585" 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">
2585
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC2585" class="line" lang="haskell"> <span class="o" style="font-weight: 600;">|</span> <span class="n" style="color: #333;">scc_annot</span> <span class="n" style="color: #333;">exp</span> <span class="p">{</span><span class="o" style="font-weight: 600;">%</span> <span class="n" style="color: #333;">ams</span> <span class="p">(</span><span class="n" style="color: #333;">sLL</span> <span class="o" style="font-weight: 600;">$</span><span class="mi" style="color: #099;">1</span> <span class="o" style="font-weight: 600;">$></span> <span class="o" style="font-weight: 600;">$</span> <span class="kt" style="color: #458; font-weight: 600;">HsSCC</span> <span class="n" style="color: #333;">noExt</span> <span class="p">(</span><span class="n" style="color: #333;">snd</span> <span class="o" style="font-weight: 600;">$</span> <span class="n" style="color: #333;">fst</span> <span class="o" style="font-weight: 600;">$</span> <span class="n" style="color: #333;">unLoc</span> <span class="o" style="font-weight: 600;">$</span><span class="mi" style="color: #099;">1</span><span class="p">)</span> <span class="p">(</span><span class="n" style="color: #333;">snd</span> <span class="o" style="font-weight: 600;">$</span> <span class="n" style="color: #333;">unLoc</span> <span class="o" style="font-weight: 600;">$</span><span class="mi" style="color: #099;">1</span><span class="p">)</span> <span class="o" style="font-weight: 600;">$</span><span class="mi" style="color: #099;">2</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="2587" 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">
2587
</td>
<td class="diff-line-num new_line" data-linenumber="2586" 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">
2586
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC2586" class="line" lang="haskell"> <span class="p">(</span><span class="n" style="color: #333;">fst</span> <span class="o" style="font-weight: 600;">$</span> <span class="n" style="color: #333;">fst</span> <span class="o" style="font-weight: 600;">$</span> <span class="n" style="color: #333;">unLoc</span> <span class="o" style="font-weight: 600;">$</span><span class="mi" style="color: #099;">1</span><span class="p">)</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="2588" 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">
2588
</td>
<td class="diff-line-num new_line" data-linenumber="2587" 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">
2587
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC2587" class="line" lang="haskell"></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="2589" 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">
2589
</td>
<td class="diff-line-num new_line old" data-linenumber="2588" 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="LC2589" class="line" lang="haskell"><span class="n" style="color: #333;">optSemi</span> <span class="o" style="font-weight: 600;">::</span> <span class="p">{</span> <span class="p">([</span><span class="kt" style="color: #458; font-weight: 600;">Located</span> <span class="n" style="color: #333;"><span class="idiff left right">a</span></span><span class="p">],</span><span class="kt" style="color: #458; font-weight: 600;">Bool</span><span class="p">)</span> <span class="p">}</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="2590" 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="2588" 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">
2588
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC2588" class="line" lang="haskell"><span class="n" style="color: #333;">optSemi</span> <span class="o" style="font-weight: 600;">::</span> <span class="p">{</span> <span class="p">([</span><span class="kt" style="color: #458; font-weight: 600;">Located</span> <span class="kt" style="color: #458; font-weight: 600;"><span class="idiff left right">Token</span></span><span class="p">],</span><span class="kt" style="color: #458; font-weight: 600;">Bool</span><span class="p">)</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="2590" 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">
2590
</td>
<td class="diff-line-num new_line" data-linenumber="2589" 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">
2589
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC2589" class="line" lang="haskell"> <span class="o" style="font-weight: 600;">:</span> <span class="sc" style="color: #d14;">';'</span> <span class="p">{</span> <span class="p">([</span><span class="o" style="font-weight: 600;">$</span><span class="mi" style="color: #099;">1</span><span class="p">],</span><span class="kt" style="color: #458; font-weight: 600;">True</span><span class="p">)</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="2591" 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">
2591
</td>
<td class="diff-line-num new_line" data-linenumber="2590" 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">
2590
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC2590" class="line" lang="haskell"> <span class="o" style="font-weight: 600;">|</span> <span class="cm" style="color: #998; font-style: italic;">{- empty -}</span> <span class="p">{</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">[]</span><span class="p">,</span><span class="kt" style="color: #458; font-weight: 600;">False</span><span class="p">)</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="2592" 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">
2592
</td>
<td class="diff-line-num new_line" data-linenumber="2591" 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">
2591
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC2591" class="line" lang="haskell"></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/605869c7b776ce6071a31ff447998b081e0354ed">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/605869c7b776ce6071a31ff447998b081e0354ed"}}</script>
</p>
</div>
</body>
</html>