<div dir="ltr"><div><div><div>I am working the next stage of Trees that Grow into GHC [1], and need to update Haddock.<br><br></div>The `Specialize` module[2] exports a single function, `specializeInstHead` which is called once, specialised to `GhcRn`.<br><br></div>So all it needs to be for haddock use is<br><br>specializeInstHead :: InstHead GhcRn -> InstHead GhcRn<br><br></div><div>But the entire module is polymorphic in the AST parameter, so it has the following instead</div><div><br></div><div><span class="gmail-pl-en">specializeInstHead</span> <span class="gmail-pl-k">::</span> (<span class="gmail-pl-en"><span class="gmail-pl-e">Ord</span></span> (<span class="gmail-pl-en">IdP</span> <span class="gmail-pl-smi">name</span>), <span class="gmail-pl-en">DataId</span> <span class="gmail-pl-smi">name</span>, <span class="gmail-pl-en">SetName</span> (<span class="gmail-pl-en">IdP</span> <span class="gmail-pl-smi">name</span>),</div><div>                                <span class="gmail-pl-en">NamedThing</span> (<span class="gmail-pl-en">IdP</span> <span class="gmail-pl-smi">name</span>)) <br></div><div><span class="gmail-pl-k">                       =></span> <span class="gmail-pl-en">InstHead</span> <span class="gmail-pl-smi">name</span> <span class="gmail-pl-k">-></span> <span class="gmail-pl-en">InstHead</span> <span class="gmail-pl-smi">name</span></div><div><span class="gmail-pl-smi"><br></span></div><div><span class="gmail-pl-smi">Question: does it need to be so polymorphic?</span></div><div><span class="gmail-pl-smi"><br></span></div><div><span class="gmail-pl-smi">I am hitting issues getting the type parameter change worked through, and it seems a bit pointless to slog on with it if it is unnecessary.</span></div><div><span class="gmail-pl-smi"><br></span></div><div><span class="gmail-pl-smi">Alan<br></span></div><div><span class="gmail-pl-smi"><br></span></div><div><span class="gmail-pl-smi">[1] <a href="https://github.com/ghc/ghc/tree/wip/ttg-2017-10-13">https://github.com/ghc/ghc/tree/wip/ttg-2017-10-13</a><br></span></div>[2] <a href="https://github.com/haskell/haddock/blob/a5bdb46185b7c0b3fced9a7fac9a62883d9d57b7/haddock-api/src/Haddock/Interface/Specialize.hs#L87">https://github.com/haskell/haddock/blob/a5bdb46185b7c0b3fced9a7fac9a62883d9d57b7/haddock-api/src/Haddock/Interface/Specialize.hs#L87</a><div><span class="gmail-pl-smi"></span></div></div>