<div dir="ltr"><div>Hi</div><div><br></div><div>Yes. As I said, <span style="font-family:monospace"><span style="font-family:arial,sans-serif"><span style="font-family:monospace"><span style="font-family:arial,sans-serif">"I could re-define the exported definitions in B as identities of those in A </span></span>(easy for functions, <i>probably more cumbersome for data constructors or classes</i>)."</span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">For example, if B needs to re-export a record with fields and data constructors, then you can't export those with a type synonym. You can re-define and export the data constructor and the record fields as functions, but then you can't do pattern matching or use record syntax on them anymore.<br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">More generally, the question remains. Should it work the way it does?</span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Cheers,</span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Ivan<br></span></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 14 Aug 2021 at 21:40, Viktor Dukhovni <<a href="mailto:ietf-dane@dukhovni.org" target="_blank">ietf-dane@dukhovni.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> On 14 Aug 2021, at 9:22 pm, Ivan Perez <<a href="mailto:ivanperezdominguez@gmail.com" target="_blank">ivanperezdominguez@gmail.com</a>> wrote:<br>
> <br>
> I have a library that is exposing too much. As a minimal example, say the library contains:<br>
> - Module A, which defines several functions and types.<br>
> - Module B, which exports specific definitions from module A and has none of its own.<br>
<br>
The simplest solution might be:<br>
<br>
module B (somefunction)<br>
<br>
import qualified A<br>
<br>
somefunction = A.somefunction<br>
<br>
This creates a *new* function in B, which is not deprecated, without<br>
re-exporting anything from A.<br>
<br>
-- <br>
Viktor.<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>