<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.Code, li.Code, div.Code
        {mso-style-name:Code;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-GB;}
span.hljs-title
        {mso-style-name:hljs-title;}
span.hljs-comment
        {mso-style-name:hljs-comment;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.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;}
/* List Definitions */
@list l0
        {mso-list-id:1452288945;
        mso-list-template-ids:-555074878;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:1790078343;
        mso-list-type:hybrid;
        mso-list-template-ids:1455311658 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Chris<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">As far as I understand it:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo2"><![if !supportLists]><span style="font-family:Symbol;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">You are plucking a type from the midst of a syntax tree, and displaying it.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo2"><![if !supportLists]><span style="font-family:Symbol;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">That type might well mention type variables that are bound “further out”<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:72.0pt;text-indent:-18.0pt;mso-list:l1 level2 lfo2">
<![if !supportLists]><span style="font-family:"Courier New";mso-fareast-language:EN-US"><span style="mso-list:Ignore">o<span style="font:7.0pt "Times New Roman"">  
</span></span></span><![endif]><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">either by a forall (if this is a sub-tree of a type)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:72.0pt;text-indent:-18.0pt;mso-list:l1 level2 lfo2">
<![if !supportLists]><span style="font-family:"Courier New";mso-fareast-language:EN-US"><span style="mso-list:Ignore">o<span style="font:7.0pt "Times New Roman"">  
</span></span></span><![endif]><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">or by a big lambda<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo2"><![if !supportLists]><span style="font-family:Symbol;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">There are some tricky UI issues in how to display such types to the user.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Generally, I think it’s mainly up to you to track which type variables are in scope from “further out”.  It’s not a property that is stable under transformation,
 so it’s not part of the TyVar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">The typechecker itself uses “tidying” to avoid accidentally displaying distinct type variables in the same way.  See TyCoRep.tidyType and related functions.  They
 may be useful to you too.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Hard for me to say more… I’m swamped, and there are genuine UI issues here.  Maybe some folk on Haskell Café might be interested.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Christopher Done [mailto:chrisdone@gmail.com]
<br>
<b>Sent:</b> 21 October 2016 15:07<br>
<b>To:</b> Simon Peyton Jones <simonpj@microsoft.com><br>
<b>Cc:</b> ghc-devs@haskell.org<br>
<b>Subject:</b> Re: How to best display type variables with the same name<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p>On 19 October 2016 at 17:00, Simon Peyton Jones <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailto%3Asimonpj%40microsoft.com&data=02%7C01%7Csimonpj%40microsoft.com%7C4c125c4fe1834a3a959708d3f9bb9d1b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126556597550377&sdata=hGnspUNnWUxTUXA%2FS%2F%2B7mw6J2WyqirrsacU21TGRk0U%3D&reserved=0">
simonpj@microsoft.com</a> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #DDDDDD 3.0pt;padding:0cm 0cm 0cm 12.0pt;margin-left:0cm;margin-top:14.4pt;margin-right:0cm;margin-bottom:14.4pt;quotes:none">
<p style="margin:1.2em!important"><span style="color:#777777">I’m afraid I didn’t understand the issue in the link below. It<br>
speaks of “querying the type”, but I’m not sure what that means. A<br>
GHCi session perhaps? Does this relate to the way GHCi displays<br>
types?<o:p></o:p></span></p>
<p style="margin:1.2em!important"><span style="color:#777777">I’m a bit lost. A from-the-beginning example, showing steps and<br>
what the unexpected behaviour is would be helpful (to me anyway)<o:p></o:p></span></p>
</blockquote>
<p style="margin:1.2em!important">Sure. I’ll explain from top-level down:<o:p></o:p></p>
<p style="margin-left:0cm;text-indent:-18.0pt;mso-list:l0 level1 lfo1;margin:1.2em!important 0px!important">
<![if !supportLists]><span style="font-size:10.0pt;font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]>In this case “querying the type” means running the
<code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">:type-at</span></code><br>
command in Intero (which itself is a fork of GHCi’s codebase around<br>
GHC 7.10):<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommercialhaskell%2Fintero%2Fblob%2Fmaster%2Fsrc%2FInteractiveUI.hs%23L1693-L1713&data=02%7C01%7Csimonpj%40microsoft.com%7C4c125c4fe1834a3a959708d3f9bb9d1b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126556597550377&sdata=C9rd1twSgpzdJ9UbdUZL4h8oCMBUrXJKGYjSlaoqrqc%3D&reserved=0">https://github.com/commercialhaskell/intero/blob/master/src/InteractiveUI.hs#L1693-L1713</a><br>
It accepts a file name, line-col to line-col span and prints the<br>
type of that expression/pattern. As you can see in that function it<br>
uses <code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">printForUserModInfo</span></code> (from
<code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">GhcMonad</span></code>), similar to (scroll above)<br>
the <code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">printForUser</span></code> for GHCi’s regular
<code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">:type</span></code> command.<o:p></o:p></p>
<p style="margin-left:0cm;text-indent:-18.0pt;mso-list:l0 level1 lfo1;margin:1.2em!important 0px!important">
<![if !supportLists]><span style="font-size:10.0pt;font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]>Where does that info come from? When we load a module in Intero, we<br>
perform an additional step of “collecting info” here:<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommercialhaskell%2Fintero%2Fblob%2Fmaster%2Fsrc%2FGhciInfo.hs%23L73&data=02%7C01%7Csimonpj%40microsoft.com%7C4c125c4fe1834a3a959708d3f9bb9d1b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126556597550377&sdata=lI4KU9JbM3tb7ZrEp684eHi1EixchPn1aeOXsUab6sU%3D&reserved=0">https://github.com/commercialhaskell/intero/blob/master/src/GhciInfo.hs#L73</a><br>
That info, for each node in the AST, is ultimately stored in a<br>
<code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">SpanInfo</span></code>:<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommercialhaskell%2Fintero%2Fblob%2Fmaster%2Fsrc%2FGhciTypes.hs%23L28-L39&data=02%7C01%7Csimonpj%40microsoft.com%7C4c125c4fe1834a3a959708d3f9bb9d1b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126556597550377&sdata=MLkyE0K2jJL%2FOE%2BnMMl1IuJ633u2jTL16BIz%2F0lK%2FEo%3D&reserved=0">https://github.com/commercialhaskell/intero/blob/master/src/GhciTypes.hs#L28-L39</a><br>
Which we then use for <code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">:type-at</span></code>.<o:p></o:p></p>
<p style="margin:1.2em!important">So in summary we collect info from <code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">tm_typechecked_source</span></code>, keep that<br>
for later, and then when the user’s editor asks via e.g. <code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">:type-at X.hs 1 5 1 7</span></code> “what is the type of the thing at this point?” we
 use<br>
GHC’s regular pretty printing function to print that type.<o:p></o:p></p>
<p style="margin:1.2em!important">That actually all works splendidly. For example, if we query<o:p></o:p></p>
<pre style="mso-margin-top-alt:0cm;margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><span class="hljs-title"><b><span style="font-family:Consolas;color:#990000;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:#F8F8F8">foo</span></b></span><code><span style="font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:#F8F8F8"> g f = maybe g f<o:p></o:p></span></code></pre>
<pre style="mso-margin-top-alt:0cm;margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><span class="hljs-comment"><i><span style="font-family:Consolas;color:#999988;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:#F8F8F8">--  ^ here or   ^ here yields g :: b</span></i></span><code><span style="font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:#F8F8F8"><o:p></o:p></span></code></pre>
<pre style="mso-margin-top-alt:0cm;margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><span class="hljs-title"><b><span style="font-family:Consolas;color:#990000;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:#F8F8F8">foo</span></b></span><code><span style="font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:#F8F8F8"> g f = maybe g f<o:p></o:p></span></code></pre>
<pre style="mso-margin-top-alt:0cm;margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><span class="hljs-comment"><i><span style="font-family:Consolas;color:#999988;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:#F8F8F8">--    ^ here or   ^ here yields: f :: a -> b</span></i></span><code><span style="font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:#F8F8F8"><o:p></o:p></span></code></pre>
<p style="margin:1.2em!important">The tricky part arises in this example:<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcommercialhaskell%2Fintero%2Fissues%2F280%23issuecomment-254784904&data=02%7C01%7Csimonpj%40microsoft.com%7C4c125c4fe1834a3a959708d3f9bb9d1b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126556597550377&sdata=r6WMD%2BUl6ilAyDX4V%2FibPSQqM9UPlBPrOUCMjjmHj9c%3D&reserved=0">https://github.com/commercialhaskell/intero/issues/280#issuecomment-254784904</a><o:p></o:p></p>
<p style="margin:1.2em!important">Which is that we have two perfectly cromulent types from the AST that<br>
are both <code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">a</span></code> in isolation, but are actually different. They will have<br>
different Unique values in their Name’s and come from different<br>
implicit <code><span style="font-size:10.0pt;font-family:Consolas;border:solid #EAEAEA 1.0pt;padding:0cm;background:#F8F8F8">forall</span></code>‘s. The question is what’s a good way to communicate<br>
this to the user?<o:p></o:p></p>
<p style="margin:1.2em!important">This is partly a “user interface” question, and on the side a “given<br>
an ideal UI, do we have the necessary info the GHC API?”<o:p></o:p></p>
<p style="margin:1.2em!important">If it helps, I could probably spend some time making an isolated<br>
module that uses the GHC API to compile a file and then report these<br>
types.<o:p></o:p></p>
<p style="margin:1.2em!important">Ciao!<o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:1.0pt">​<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>