Hi, Nick,

I'd be very interested to see that if you have managed to carry over all 
the infix operators from *Basics*.  I tried something like this myself in a 
fork of imeckler/ratio, but found that (for example) Basics.(+) would 
interfere with Ratio.(+).  In the end I used operators like (|+|), (+|) and 
(|+) for the cases where you're a) adding two rationals, (b) adding an int 
to a rational or (c) adding a rational to an int.  I found it relatively 
unobtrusive but I seem to get the feeling that this sort of thing is 
becoming frowned upon.  I have hesitated to publish it.

On Saturday, 26 November 2016 20:57:50 UTC, Nick H wrote:
>
> I have a module that implements most of the math functions from *Basics* 
> for rational numbers. Happy to publish it.
>
> For interop with ints, there is
>
> int : Int -> Rational
>
> Then converting back you have the normal round/floor/ceiling as well as 
> toFloat. Is that unobtrusive enough?
>
>
> On Sat, Nov 26, 2016 at 9:44 AM, John Watson <john....@gmx.co.uk 
> <javascript:>> wrote:
>
>> Nothing too complex.  I do stuff with music notation, which has the 
>> concept of half note, quarter note etc.  One thing I've been toying with is 
>> porting the Haskell School of Music 
>> <http://haskell.cs.yale.edu/wp-content/uploads/2015/03/HSoM.pdf> / 
>> Euterpea <https://github.com/Euterpea/Euterpea> to Elm. I just prefer to 
>> model things with the right abstraction.
>>
>>
>> On Saturday, 26 November 2016 15:44:28 UTC, Max Goldstein wrote:
>>>
>>> What problem are you trying to solve that you can't do with Floats?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elm-discuss...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to