On 8 Jan 2009, at 23:11, DavidA wrote:
inv :: IntegerAsType n => Fp n -> Fp n
^ ^ ^
this "n" --------------+-------+-------|
inv 0 = error "Fp,inv 0"
inv (Fp x) = let p = value (undefined :: n)
^
and this one ------------------------------|
are different beasts.
You can try something like this:
getN :: Fp n -> n
getN _ = undefined
inv a@(Fp x) = let p = value $ getN a
...
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe