[Haskell-cafe] Strange breakage after Hugs upgrade

John Goerzen jgoerzen at complete.org
Tue Apr 5 13:07:40 EDT 2005


Hi,

I have this code:


class (Show a) => HVFSStat a where
...
    vModificationTime :: a -> EpochTime

...
class (Show a) => HVFS a where
...
    vGetModificationTime :: a -> FilePath -> IO ClockTime
...

    vGetModificationTime fs fp = 
        do s <- vGetFileStatus fs fp
           return $ TOD (fromIntegral (withStat s vModificationTime)) 0

This works fine in Hugs 200311, but in Hugs 20050308, I get:

ERROR "/home/jgoerzen/tree/projects/missingh/MissingH/IO/HVFS.hs":198 -
Implementation of vGetModificationTime requires extra context
*** Expected type   : HVFS a => a -> FilePath -> IO ClockTime
*** Missing context : Integral CTime

I can't figure out what's going on; the type of the expression
(withStat s vModificationTime) is EpochTime, and I don't understand why
Hugs would have decided to break this code.

Thanks,
John





More information about the Haskell-Cafe mailing list