I would be a +1 to any or all of these changes. I, too, don&#39;t see the point in hiding the constructor in a separate module. Like you said, the fromEnum/toEnum instances already give away the farm.<div><br></div><div>-Edward<br>
<br><div class="gmail_quote">On Sat, Dec 8, 2012 at 12:49 AM, Ashley Yakeley <span dir="ltr">&lt;<a href="mailto:ashley@semantic.org" target="_blank">ashley@semantic.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":146">already expose the internal Integer, badly, as an Int.<br>
<br>
These are the changes I think we should make to Fixed:<br>
<br>
1. Make the internal type generic, similar to Ratio/Rational.<br>
<br>
2. Make access to the internal type easy and fast. Ratio has numerator/denominator/(%), but Ratio needs to canonicalise its values to lowest terms. Fixed doesn&#39;t need that, so exposing the constructor should serve.<br>

<br>
3. Move Data.Fixed into a new package, possibly with Data.Ratio and perhaps other numerics stuff that can be moved out of base.<br>
<br>
4. Move div&#39;, mod&#39; and divmod&#39; to a more sensible module and maybe rename them, or have them replace div, mod and divmod.<br>
<br>
I am somewhat motivated to 1 by calls to make certain time types generic, although that&#39;s a separate discussion with its own issues.<div class="yj6qo ajU"><div id=":10c" class="ajR" tabindex="0"></div></div></div></blockquote>
</div><br></div>