
Hi all, I want to use *plugins* package (http://hackage.haskell.org/package/plugins-1.4.1) Unfortunately, it looks broken. Anybody can fix it? Thanks, -- Andy

Andy Stewart
Hi all,
I want to use *plugins* package (http://hackage.haskell.org/package/plugins-1.4.1)
Unfortunately, it looks broken. Anybody can fix it?
Try putting an upper bound in the constraint for `base'; since there's no upper bound, cabal-install defaults to "< 4", which conflicts with plugins _needing_ base >= 4. The hint library might also do what you want: http://hackage.haskell.org/package/hint -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Andy Stewart
writes: Hi all,
I want to use *plugins* package (http://hackage.haskell.org/package/plugins-1.4.1)
Unfortunately, it looks broken. Anybody can fix it?
Try putting an upper bound in the constraint for `base'; since there's no upper bound, cabal-install defaults to "< 4", which conflicts with plugins _needing_ base >= 4. I think not just build-depend problem, something broken in plugins
Hi Ivan,
Ivan Lazar Miljenovic
The hint library might also do what you want: http://hackage.haskell.org/package/hint
Wow, i didn't know it. Infact, i want implement a *fully* hot-swapping feature for Haskell application, not just re-compile/re-load module in runtime like Yi/Xmonad, i have code do that. I want to a Haskell interpreter to evaluation expression/module in runtime, then application can develop itself in runtime, don't need restart. hint library looks interesting..... Thanks for hint link. -- Andy

Andy Stewart
Hi Ivan,
Ivan Lazar Miljenovic
writes: Andy Stewart
writes: Hi all,
I want to use *plugins* package (http://hackage.haskell.org/package/plugins-1.4.1)
Unfortunately, it looks broken. Anybody can fix it?
Try putting an upper bound in the constraint for `base'; since there's no upper bound, cabal-install defaults to "< 4", which conflicts with plugins _needing_ base >= 4. I think not just build-depend problem, something broken in plugins source code, below is compile error:
.... src/System/Plugins/Process.hs:59:4: Warning: A do-notation statement discarded a result of type GHC.Conc.ThreadId. Suppress this warning by saying "_ <- forkIO ((>>) E.evaluate (length errput) return GHC.Unit.())", or by using the flag -fno-warn-unused-do-bind [ 3 of 15] Compiling System.Plugins.Parser ( src/System/Plugins/Parser.hs, dist/build/System/Plugins/Parser.o )
src/System/Plugins/Parser.hs:31:0: Warning: The import of `Data.Either' is redundant except perhaps to import instances from `Data.Either' To import instances alone, use: import Data.Either() [ 4 of 15] Compiling System.Plugins.PackageAPI ( src/System/Plugins/PackageAPI.hs, dist/build/System/Plugins/PackageAPI.o )
src/System/Plugins/PackageAPI.hs:61:24: Not in scope: `package'
src/System/Plugins/PackageAPI.hs:62:25: Not in scope: `package' ... Looks plugins just work on base-4 and Cabal-1.6. Anyone can fix it make it works with Cabal-1.8?
Thanks, -- Andy
The hint library might also do what you want: http://hackage.haskell.org/package/hint
Wow, i didn't know it.
Infact, i want implement a *fully* hot-swapping feature for Haskell application, not just re-compile/re-load module in runtime like Yi/Xmonad, i have code do that. I want to a Haskell interpreter to evaluation expression/module in runtime, then application can develop itself in runtime, don't need restart.
hint library looks interesting.....
Thanks for hint link.
-- Andy

src/System/Plugins/Process.hs:59:4: Warning: A do-notation statement discarded a result of type GHC.Conc.ThreadId. Suppress this warning by saying "_ <- forkIO ((>>) E.evaluate (length errput) return GHC.Unit.())", or by using the flag -fno-warn-unused-do-bind [ 3 of 15] Compiling System.Plugins.Parser ( src/System/Plugins/Parser.hs, dist/build/System/Plugins/Parser.o )
src/System/Plugins/Parser.hs:31:0: Warning: The import of `Data.Either' is redundant except perhaps to import instances from `Data.Either' To import instances alone, use: import Data.Either() [ 4 of 15] Compiling System.Plugins.PackageAPI ( src/System/Plugins/PackageAPI.hs, dist/build/System/Plugins/PackageAPI.o )
src/System/Plugins/PackageAPI.hs:61:24: Not in scope: `package'
src/System/Plugins/PackageAPI.hs:62:25: Not in scope: `package' ...
You can just replace 'package' with 'sourcePackageId'

Yuras Shumovich
src/System/Plugins/Process.hs:59:4: Warning: A do-notation statement discarded a result of type GHC.Conc.ThreadId. Suppress this warning by saying "_ <- forkIO ((>>) E.evaluate (length errput) return GHC.Unit.())", or by using the flag -fno-warn-unused-do-bind [ 3 of 15] Compiling System.Plugins.Parser ( src/System/Plugins/Parser.hs, dist/build/System/Plugins/Parser.o )
src/System/Plugins/Parser.hs:31:0: Warning: The import of `Data.Either' is redundant except perhaps to import instances from `Data.Either' To import instances alone, use: import Data.Either() [ 4 of 15] Compiling System.Plugins.PackageAPI ( src/System/Plugins/PackageAPI.hs, dist/build/System/Plugins/PackageAPI.o )
src/System/Plugins/PackageAPI.hs:61:24: Not in scope: `package'
src/System/Plugins/PackageAPI.hs:62:25: Not in scope: `package' ...
You can just replace 'package' with 'sourcePackageId' After replace 'package' with 'sourcePackageId'
Another error : ------------------------------> error start <------------------------------ Preprocessing library plugins-1.4.1... Building plugins-1.4.1... [ 7 of 15] Compiling System.Plugins.Env ( src/System/Plugins/Env.hs, dist/build/System/Plugins/Env.o ) src/System/Plugins/Env.hs:315:45: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the second argument of `getInstalledPackages', namely `(SpecificPackageDB f)' In a stmt of a 'do' expression: pkgIndex <- getInstalledPackages silent (SpecificPackageDB f) pc In the expression: do { pc <- configureAllKnownPrograms silent defaultProgramConfiguration; pkgIndex <- getInstalledPackages silent (SpecificPackageDB f) pc; return $ allPackages pkgIndex } cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 ------------------------------> error end <------------------------------ Thanks, -- Andy

Another error :
------------------------------> error start <------------------------------ Preprocessing library plugins-1.4.1... Building plugins-1.4.1... [ 7 of 15] Compiling System.Plugins.Env ( src/System/Plugins/Env.hs, dist/build/System/Plugins/Env.o )
src/System/Plugins/Env.hs:315:45: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the second argument of `getInstalledPackages', namely `(SpecificPackageDB f)' In a stmt of a 'do' expression: pkgIndex <- getInstalledPackages silent (SpecificPackageDB f) pc In the expression: do { pc <- configureAllKnownPrograms silent defaultProgramConfiguration; pkgIndex <- getInstalledPackages silent (SpecificPackageDB f) pc; return $ allPackages pkgIndex } cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 ------------------------------> error end <------------------------------
It looks like it is not the last error :) Try this: pkgIndex <- getInstalledPackages silent [SpecificPackageDB f] pc Not sure it will work as expected after that, but you can just try :)

Yuras Shumovich
Another error :
------------------------------> error start <------------------------------ Preprocessing library plugins-1.4.1... Building plugins-1.4.1... [ 7 of 15] Compiling System.Plugins.Env ( src/System/Plugins/Env.hs, dist/build/System/Plugins/Env.o )
src/System/Plugins/Env.hs:315:45: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the second argument of `getInstalledPackages', namely `(SpecificPackageDB f)' In a stmt of a 'do' expression: pkgIndex <- getInstalledPackages silent (SpecificPackageDB f) pc In the expression: do { pc <- configureAllKnownPrograms silent defaultProgramConfiguration; pkgIndex <- getInstalledPackages silent (SpecificPackageDB f) pc; return $ allPackages pkgIndex } cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 ------------------------------> error end <------------------------------
It looks like it is not the last error :) Yes, it's not last error. :)
I got another error: ------------------------------> error start <------------------------------ [ 8 of 15] Compiling System.MkTemp ( src/System/MkTemp.hs, dist/build/System/MkTemp.o ) src/System/MkTemp.hs:214:26: Couldn't match expected type `IOError' against inferred type `Maybe FilePath -> IOException' In the first argument of `ioError', namely `err' In the expression: ioError err In the expression: if b then ioError err else openFile f ReadWriteMode cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 ------------------------------> error end <------------------------------ Thank you very much help me so far. I hope Don can taking some time to fix those problems. Cheers, -- Andy

I got another error: ------------------------------> error start <------------------------------ [ 8 of 15] Compiling System.MkTemp ( src/System/MkTemp.hs, dist/build/System/MkTemp.o )
src/System/MkTemp.hs:214:26: Couldn't match expected type `IOError' against inferred type `Maybe FilePath -> IOException' In the first argument of `ioError', namely `err' In the expression: ioError err In the expression: if b then ioError err else openFile f ReadWriteMode cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 ------------------------------> error end <------------------------------
I checked out sources and tried it myself. You need: [mkTemp:217] err = IOError Nothing AlreadyExists "open0600" "already exists" Nothing Nothing if you will get error in readBinIface', then [Load.hs:725] e <- newHscEnv undefined undefined if you will get error in loadFunction__, then [Load.hs: 441] ptr@(Ptr addr) <- withCString symbol c_lookupSymbol It should compile now, but I don't know will it work or no.

Yuras Shumovich
I got another error: ------------------------------> error start <------------------------------ [ 8 of 15] Compiling System.MkTemp ( src/System/MkTemp.hs, dist/build/System/MkTemp.o )
src/System/MkTemp.hs:214:26: Couldn't match expected type `IOError' against inferred type `Maybe FilePath -> IOException' In the first argument of `ioError', namely `err' In the expression: ioError err In the expression: if b then ioError err else openFile f ReadWriteMode cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 ------------------------------> error end <------------------------------
I checked out sources and tried it myself. You need:
[mkTemp:217] err = IOError Nothing AlreadyExists "open0600" "already exists" Nothing Nothing
if you will get error in readBinIface', then [Load.hs:725] e <- newHscEnv undefined undefined
if you will get error in loadFunction__, then [Load.hs: 441] ptr@(Ptr addr) <- withCString symbol c_lookupSymbol
It should compile now, but I don't know will it work or no. Thanks for your time and help.
I think best to let author fix those problem. Cheers, -- Andy
participants (3)
-
Andy Stewart
-
Ivan Lazar Miljenovic
-
Yuras Shumovich