Re: [Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-16 Thread Max Cantor
@Jason I'm not sure what you mean about exposing the type information. Unless you mean that each currency would be a separate type somehow. While this is a similar problem to the dimensional issue, the problem is that the FX rates are changing all the time. While the conversion between a

Re: [Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-16 Thread jeff p
Hello, To let the type checker do some work for you, without getting all the way into the territory of the dimensional package, you can use newtypes and a Units class with methods for wrapping and unwrapping Doubles; we use this approach at work and find it strikes a nice balance between useful

[Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-15 Thread Max Cantor
Hi all, I'm putting together some simple tools to do safe calculations on different currencies. For instance, making sure that you dont add something like 5 USD + 10 JPY without doing a proper conversion. I've put up some code on google code which probably explains what I'm trying to do

Re: [Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-15 Thread Antoine Latter
On Sat, Aug 15, 2009 at 7:15 AM, Max Cantormxcan...@gmail.com wrote: Hi all, I'm putting together some simple tools to do safe calculations on different currencies.  For instance, making sure that you dont add something like 5 USD + 10 JPY without doing a proper conversion. I've put up some

Re: [Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-15 Thread Jason Dagit
On Sat, Aug 15, 2009 at 5:15 AM, Max Cantor mxcan...@gmail.com wrote: Hi all, I'm putting together some simple tools to do safe calculations on different currencies. For instance, making sure that you dont add something like 5 USD + 10 JPY without doing a proper conversion. I've put up