Dear Hugs Gurus, could somebody help me?
Haskell, so I cooked-up a different algebraic scheme, with
Monoid for the multiplication, Addgroup for addition, etc.,
as I want to do some more involved applied mathematics, with
not-so-orthodox computational entities.
I have hidden (from the Prelude) all this collection: Num, (+)
etc., Fractional, and other things, but I demanded that Prelude
exports the primitives, from which all needed overloaded entities
have been instantiated for the "standard" numerical data.
This module is much simpler than the algebraic propositions
of Sergei Mechveliani, it is just ad hoc.
At least one thing works badly: the *default*. Before, the
numbers as 3.1415 were lifted automatically into whatever by
fromDouble, and polymorphic functions with explicit constants
were quite comfortable to write. Now the type checker became
allergic. It demands that I put fromDouble by hand.
So, my question is: is somehow the Fractional class, the fromDouble
function within it, the default etc. hard-coded into Hugs executable,
or I have done something silly (which is quite probable).
Do you foresee similar problems with GHC (I didn't test it yet)?
Jerzy Karczmarczuk
Caen, France.