<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
.MsoPapDefault
        {mso-style-type:export-only;
        margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">I have <a href="https://github.com/ghc-proposals/ghc-proposals/pull/265#issuecomment-896626642">
just posted</a> this, about unlifted data types.  Yikes!  <o:p></o:p></p>
<p class="MsoNormal">Simon<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><a href="https://github.com/ghc-proposals/ghc-proposals/pull/265">In accepted proposal #265 on Unlifted Datatypes</a><o:p></o:p></b></p>
<p>I have just realised that in this accepted, and implemented proposal we have done something entirely new. Consider this (from
<a href="https://gitlab.haskell.org/ghc/ghc/-/issues/20204">https://gitlab.haskell.org/ghc/ghc/-/issues/20204</a>)<o:p></o:p></p>
<pre><code>type IntU ::  Bool -> Wombat<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code>...LOTS OF CODE...<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code>data IntU a b = IntU Int<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code>...MORE CODE...<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code>type Wombat =Type -> TYPE UnliftedRep<o:p></o:p></code></pre>
<p>The kind signature for <code><span style="font-size:10.0pt">IntU</span></code>
<em><span style="font-family:"Calibri",sans-serif">completely changes the semantics of the
</span></em><code><i><span style="font-size:10.0pt">data IntU</span></i></code><em><span style="font-family:"Calibri",sans-serif"> declaration</span></em>, and yet can be separate from it. That is new: generally, signatures can restrict the applicability of
 something, but <em><span style="font-family:"Calibri",sans-serif">don't change its semantics</span></em>. (Yes, with overlapping instances, certainly incoherent instances, you could change semantics, but the general principal holds.)<o:p></o:p></p>
<p>Even if it is adjacent, the fact that it's unlifted is quite subtle... you have to look to the right of the arrows, and then through the distant (and perhaps imported) type synonym
<code><span style="font-size:10.0pt">Wombat</span></code>.<o:p></o:p></p>
<p>I'm not very happy with a distant kind signature having such a profound effect on the semantics of the data type. Indeed in
<a href="https://github.com/ghc-proposals/ghc-proposals/pull/265#issuecomment-525705557">
my comment above</a> I suggested a keyword<o:p></o:p></p>
<pre><code>data unlifted IntU a b = IntU Int<o:p></o:p></code></pre>
<p>to signal that it's an <em><span style="font-family:"Calibri",sans-serif">unlifted</span></em> data type. But then I went AWOL and didn't pursue the matter. I don't know why I was so negligent.<o:p></o:p></p>
<p>So this post is to ask: does anyone else think this is bizarre? I'm inclined to make a proposal to add the keyword, but I thought I'd test the waters first.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>