i seem to have a problem with a qualified import of the prelude in hugs
nov03, haskell extensions, under windows:

Reading file "C:\gisTheoryCodeSept03\lib\Language\Value240.hs":
ERROR "C:\gisTheoryCodeSept03\lib\Language\Value240.hs":207 - Ambiguous
variable occurrence "quotRem"
*** Could refer to: Language.Value240.quotRem Hugs.Prelude.quotRem

the relevant code is:

instance Ring Float where
    quotRem a b = (toFloat i, toFloat (b * f))
        where   ab = a/b
                i::Int
                (i,f)  = Prelude.properFraction ab
    rem a b = f     where (i,f) = quotRem a b                   --here is line 240 
with the
error
    (*) = (Prelude.*)
    quot a b = i    where (i,f) = quotRem a b
    div = error "div not implemented for float"
    mod a b = error "mod not implemented for float"

i had a similar error (redefining a class Integral and a complaint in the
export list of ambiguit between the local definition and the qualified
import). it seems that qualified import of the prelude is not properly
handled?

unfortunately this is not a small file and i did not manage to isolate the
problem quickly in a small example. can you see what is wrong here?  the
file value240.hs is attached.

thank you for your attention
andrew



Andrew U. Frank
Geoinformation E127                                     phone: +43 1 588 01 12710
TU Vienna                                       secr.  +43 1 588 01 12700
Gusshausstrasse 27-29                   fax    +43 1 588 01 12799
A-1040 Vienna Austria                           cellular phone +43 676 41925 72
http://www.geoinfo.tuwien.ac.at/persons/frank/frank.html

Attachment: value240.hs
Description: haskell

_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to