
I tend to install haskell packages from apt whenever possible. One such package is "unix", which appears to come provided by the ghc6 debian package. I'm trying to cabal install lambdabot and getting the following: $ cabal install lambdabot Resolving dependencies... Configuring lambdabot-4.2.2.1... Preprocessing executables for lambdabot-4.2.2.1... Building lambdabot-4.2.2.1... Main.hs:11:7: Could not find module `System.Posix.Signals': It is a member of the hidden package `unix-2.4.0.0'. Perhaps you need to add `unix' to the build-depends in your .cabal file. Use -v to see a list of the files searched for. cabal: Error: some packages failed to install: lambdabot-4.2.2.1 failed during the building phase. The exception was: ExitFailure 1 I have a feeling this has something to do with the interaction between cabal and apt... Does anyone have any advice for fixing this issue other than just adding "unix" to the lambdabot.cabal file? -- Alex R

On 1 April 2010 11:42, Alex Rozenshteyn
Main.hs:11:7: Could not find module `System.Posix.Signals': It is a member of the hidden package `unix-2.4.0.0'. Perhaps you need to add `unix' to the build-depends in your .cabal file.
Interesting, because unix _is_ listed in build-depends in the .cabal file for lambdabot. Does "ghc-pkg check" complain about unix? Does "ghc-pkg list unix" say it's there?
I have a feeling this has something to do with the interaction between cabal and apt...
Highly unlikely unless there's an inconsistency in the packages on your system. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

$ ghc-pkg check
outputs nothing
$ ghc-pkg list unix
/var/lib/ghc-6.12.1/package.conf.d
unix-2.4.0.0
/home/alex/.ghc/x86_64-linux-6.12.1/package.conf.d
"unix" appears to be in the build-depends of the "Library", but not in the
build-depends of "Executable lambdabot"
Adding "unix" to the second build-depends appears to fix the error (but now
it complains that base is hidden).
On Wed, Mar 31, 2010 at 8:48 PM, Ivan Miljenovic
On 1 April 2010 11:42, Alex Rozenshteyn
wrote: Main.hs:11:7: Could not find module `System.Posix.Signals': It is a member of the hidden package `unix-2.4.0.0'. Perhaps you need to add `unix' to the build-depends in your .cabal file.
Interesting, because unix _is_ listed in build-depends in the .cabal file for lambdabot.
Does "ghc-pkg check" complain about unix? Does "ghc-pkg list unix" say it's there?
I have a feeling this has something to do with the interaction between cabal and apt...
Highly unlikely unless there's an inconsistency in the packages on your system.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
-- Alex R

Anyone?
On Wed, Mar 31, 2010 at 9:18 PM, Alex Rozenshteyn
$ ghc-pkg check
outputs nothing
$ ghc-pkg list unix /var/lib/ghc-6.12.1/package.conf.d unix-2.4.0.0 /home/alex/.ghc/x86_64-linux-6.12.1/package.conf.d
"unix" appears to be in the build-depends of the "Library", but not in the build-depends of "Executable lambdabot" Adding "unix" to the second build-depends appears to fix the error (but now it complains that base is hidden).
On Wed, Mar 31, 2010 at 8:48 PM, Ivan Miljenovic < ivan.miljenovic@gmail.com> wrote:
On 1 April 2010 11:42, Alex Rozenshteyn
wrote: Main.hs:11:7: Could not find module `System.Posix.Signals': It is a member of the hidden package `unix-2.4.0.0'. Perhaps you need to add `unix' to the build-depends in your .cabal file.
Interesting, because unix _is_ listed in build-depends in the .cabal file for lambdabot.
Does "ghc-pkg check" complain about unix? Does "ghc-pkg list unix" say it's there?
I have a feeling this has something to do with the interaction between cabal and apt...
Highly unlikely unless there's an inconsistency in the packages on your system.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
-- Alex R
-- Alex R

Am Montag 05 April 2010 17:19:35 schrieb Alex Rozenshteyn:
Anyone?
"base" isn't listed among the build-depends of the executable, so the obvious thing is to add base to the build-depends and see what happens then (might also be necessary for some other packages). I'm not sure whether iterating that strategy will get lambdabot to build or it's too bit-rotted, so prepare to dive into the sources if you really want it to build.
On Wed, Mar 31, 2010 at 9:18 PM, Alex Rozenshteyn
$ ghc-pkg check
outputs nothing
$ ghc-pkg list unix /var/lib/ghc-6.12.1/package.conf.d unix-2.4.0.0 /home/alex/.ghc/x86_64-linux-6.12.1/package.conf.d
"unix" appears to be in the build-depends of the "Library", but not in the build-depends of "Executable lambdabot" Adding "unix" to the second build-depends appears to fix the error (but now it complains that base is hidden).
On Wed, Mar 31, 2010 at 8:48 PM, Ivan Miljenovic <
ivan.miljenovic@gmail.com> wrote:
On 1 April 2010 11:42, Alex Rozenshteyn
wrote: Main.hs:11:7: Could not find module `System.Posix.Signals': It is a member of the hidden package `unix-2.4.0.0'. Perhaps you need to add `unix' to the build-depends in your .cabal file.
Interesting, because unix _is_ listed in build-depends in the .cabal file for lambdabot.
Does "ghc-pkg check" complain about unix? Does "ghc-pkg list unix" say it's there?
I have a feeling this has something to do with the interaction between
cabal
and apt...
Highly unlikely unless there's an inconsistency in the packages on your system.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
-- Alex R

I did try that; after adding a bunch of packages to the .cabal file and
trying to build i get this:
[ 1 of 81] Compiling Plugin.Dict.DictLookup ( Plugin/Dict/DictLookup.hs,
dist/build/lambdabot/lambdabot-tmp/Plugin/Dict/DictLookup.o )
Plugin/Dict/DictLookup.hs:33:4:
Ambiguous type variable `e' in the constraint:
`GHC.Exception.Exception e'
arising from a use of `handle' at Plugin/Dict/DictLookup.hs:33:4-42
Probable fix: add a type signature that fixes these type variable(s)
cabal: Error: some packages failed to install:
lambdabot-4.2.2.1 failed during the building phase. The exception was:
ExitFailure 1
On Mon, Apr 5, 2010 at 11:25 AM, Daniel Fischer
Am Montag 05 April 2010 17:19:35 schrieb Alex Rozenshteyn:
Anyone?
"base" isn't listed among the build-depends of the executable, so the obvious thing is to add base to the build-depends and see what happens then (might also be necessary for some other packages).
I'm not sure whether iterating that strategy will get lambdabot to build or it's too bit-rotted, so prepare to dive into the sources if you really want it to build.
On Wed, Mar 31, 2010 at 9:18 PM, Alex Rozenshteyn
wrote: $ ghc-pkg check
outputs nothing
$ ghc-pkg list unix /var/lib/ghc-6.12.1/package.conf.d unix-2.4.0.0 /home/alex/.ghc/x86_64-linux-6.12.1/package.conf.d
"unix" appears to be in the build-depends of the "Library", but not in the build-depends of "Executable lambdabot" Adding "unix" to the second build-depends appears to fix the error (but now it complains that base is hidden).
On Wed, Mar 31, 2010 at 8:48 PM, Ivan Miljenovic <
ivan.miljenovic@gmail.com> wrote:
On 1 April 2010 11:42, Alex Rozenshteyn
wrote: Main.hs:11:7: Could not find module `System.Posix.Signals': It is a member of the hidden package `unix-2.4.0.0'. Perhaps you need to add `unix' to the build-depends in your .cabal file.
Interesting, because unix _is_ listed in build-depends in the .cabal file for lambdabot.
Does "ghc-pkg check" complain about unix? Does "ghc-pkg list unix" say it's there?
I have a feeling this has something to do with the interaction between
cabal
and apt...
Highly unlikely unless there's an inconsistency in the packages on your system.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
-- Alex R
-- Alex R

Am Montag 05 April 2010 17:39:29 schrieb Alex Rozenshteyn:
I did try that; after adding a bunch of packages to the .cabal file and trying to build i get this: [ 1 of 81] Compiling Plugin.Dict.DictLookup ( Plugin/Dict/DictLookup.hs, dist/build/lambdabot/lambdabot-tmp/Plugin/Dict/DictLookup.o )
Plugin/Dict/DictLookup.hs:33:4: Ambiguous type variable `e' in the constraint: `GHC.Exception.Exception e' arising from a use of `handle' at Plugin/Dict/DictLookup.hs:33:4-42 Probable fix: add a type signature that fixes these type variable(s) cabal: Error: some packages failed to install: lambdabot-4.2.2.1 failed during the building phase. The exception was: ExitFailure 1
Looks like it was written for the old Control.Exception. You can a) change the import to import Control.OldException (handle) b) add a type signature in that line, e.g. handle (\(e :: SomeException) -> ...) if you don't know what types of exceptions to expect
participants (3)
-
Alex Rozenshteyn
-
Daniel Fischer
-
Ivan Miljenovic