Hi,
I am trying to implement quadratic fields Q(sqrt d). These are numbers of the
form a + b sqrt d, where a and b are rationals, and d is an integer.
In an earlier attempt, I tried
data QF = QF Integer Rational Rational
(see http://www.polyomino.f2s.com/david/haskell/hs/QuadraticField.hs.txt)
Use
value :: a - Integer
On 8/18/07, DavidA [EMAIL PROTECTED] wrote:
Hi,
I am trying to implement quadratic fields Q(sqrt d). These are numbers of
the
form a + b sqrt d, where a and b are rationals, and d is an integer.
In an earlier attempt, I tried
data QF = QF Integer Rational
DavidA wrote:
Hi,
I am trying to implement quadratic fields Q(sqrt d). These are numbers of the
form a + b sqrt d, where a and b are rationals, and d is an integer.
...
class IntegerType a where
value :: Integer
The problem is, this doesn't work. GHC complains:
The class method