hs-plugins runtime error with GHC 6.6: index out of range

Donald Bruce Stewart dons at cse.unsw.edu.au
Fri Nov 3 22:30:55 EST 2006


cschmidt:
> After upgrading from GHC 6.4.2 to GHC 6.6 and rebuilding hs-plugins
> package, I noticed that hs-plugins does not work anymore.
> 
> When I try to load a plugin, I get an "Index out of range" error.
> For example, when I compile the hs-plugins\testsuite\make\simple
> example and run the executable, the error message is
> 
> a.out: Ix{Int}.index: Index (65536) out of range ((0,11))
> 
> Other tests give similar results; the values of the index and the
> range vary.
> 
> Does anybody know what is wrong here?
> I use hs-plugins-1.0-rc0 and GHC 6.6 on Windows
> (hs-plugins worked fine with GHC 6.4.2).

this code:
    do c <- get :: HsPluginsRequestors [String]
       liftIO $ print (length c + 1)
       put ("cyril": c)

prints:
    10

:)

3 issues break hs-plugins in 6.6, and I'm working on them:

    a) AltData.Typeable is obsolete, now that Typeable handles dynamic code properly
    b) the .hi file format changed, so the hs-plugins .hi parser needs to as wel
    c) the package format changed a little bit

Should be about 1 days work. 

-- Don


More information about the Libraries mailing list