
I've installed lambdabot, but check within it seems to be broken: the only answer it ever gives is "Terminated". For example: lambdabot> check True Terminated lambdabot> quickCheck works just fine in a GHCi session: Prelude> :m + Test.QuickCheck [...] Prelude> quickCheck True [...] +++ OK, passed 100 tests. (GHC 7.0.3 on Ubuntu Natty, everything freshly installed with cabal install as far as possible.) Any advice?

On Tue, May 24, 2011 at 7:00 AM, Jacek Generowicz
I've installed lambdabot, but check within it seems to be broken: the only answer it ever gives is "Terminated". For example:
lambdabot> check True Terminated lambdabot>
quickCheck works just fine in a GHCi session:
Prelude> :m + Test.QuickCheck [...] Prelude> quickCheck True [...] +++ OK, passed 100 tests.
@check these days goes through mueval. Are you sure mueval is installed & working? You can try running the tests.sh script which will exercise the QuickCheck functionality among other things. -- gwern http://www.gwern.net

On 2011 May 24, at 22:30, Gwern Branwen wrote:
@check these days goes through mueval. Are you sure mueval is installed & working?
Au contraire: I am sure that mueval was *not* installed. (Am I justified to be a just a little bit annoyed that it was not installed as a dependency by cabal install? Or that there was no indication whatsoever that mueval's absence was the cause of the problem?) Now that I have installed it explicitly myself, I do seem to make some more progress, but it's still far short of the ideal: lambdabot> check True unrecognized option `--loadfile=' Usage: mueval [OPTION...] --expression EXPRESSION... -p PASSWORD --password=PASSWORD The password for the mubot account. If this is set, mueval will attempt to setuid to the mubot user. This is optional, as it requires the mubot user to be set up properly. (Currently a null-op.) [etc. etc.]
You can try running the tests.sh script which will exercise the QuickCheck functionality among other things.
This, AFAICT, seems to go just fine. There's lots of output with which
I won't spam you, other than to say that it includes the text "OK, all
the valid expressions worked out well. Now let's test various
misbehaved expressions". The last line of the output is "

On Wed, 25 May 2011 02:15:12 +0200, Jacek Generowicz
On 2011 May 24, at 22:30, Gwern Branwen wrote:
@check these days goes through mueval. Are you sure mueval is installed & working?
Au contraire: I am sure that mueval was *not* installed. (Am I justified to be a just a little bit annoyed that it was not installed as a dependency by cabal install? Or that there was no indication whatsoever that mueval's absence was the cause of the problem?)
Now that I have installed it explicitly myself, I do seem to make some more progress, but it's still far short of the ideal:
lambdabot> check True unrecognized option `--loadfile=' Usage: mueval [OPTION...] --expression EXPRESSION... -p PASSWORD --password=PASSWORD The password for the mubot account. If this is set, mueval will attempt to setuid to the mubot user. This is optional, as it requires the mubot user to be set up properly. (Currently a null-op.)
[etc. etc.]
You can try running the tests.sh script which will exercise the QuickCheck functionality among other things.
This, AFAICT, seems to go just fine. There's lots of output with which I won't spam you, other than to say that it includes the text "OK, all the valid expressions worked out well. Now let's test various misbehaved expressions". The last line of the output is "
>". So, it seems that I am now faced with the problem of getting lambdabot and mueval to talk to each other sensibly. Any pointers would be gratefully received.
Hi Jacek and Gwern, In the upgrade from mueval from 0.8 to 0.8.1, some of the mueval command line options were changed: --loadfile => --load-file --noimports => --no-imports For Plugins/Check.hs I change --loadfile to -l. To convince lambdabot to run on gentoo, I patch it to use --no-imports to avoid this problem: % mueval -e '1 + 2' Ambiguous module name `Control.Monad.Cont': it was found in multiple packages: monads-fd-0.1.0.2 mtl-2.0.1.0 monads-tf-0.1.0.0 % And I patch the lambdabot /usr/share/lambdabot-4.2.3.2/ghc-7.0.3/State/L.hs to used -XPackageImports. Then mueval works: % mueval --no-imports -l ~/.lambdabot/State/L.hs -e '1 + 2' 3 % And lambdabot works: % lambdabot Initialising plugins ................................................... done. lambdabot> @check True +++ OK, passed 100 tests. "OK, passed 100 tests." lambdabot> The patch is here: https://github.com/markwright/gentoo-haskell/blob/master/dev-haskell/lambdab... Regards, Mark

Hi Mark, Thanks for your wonderfully lucid, concise and complete explanation of the problem and its solution (included below). When I apply your patch and reinstall lambabot, I now get the following problem: lambdabot> check True Could not find module `ShowIO`: It is a member of the hidden package `show-0.3.4`. Use -v to see a list of the files searched for. I recognize the message about -v as a ghci one. How could I inject this -v into lambabot ? I get the same error on both of the machines on which I am trying this. On one of them I already have show-0.3.4 and show-0.4.1.1, on the other I have only show-0.4.1.1. Any suggestions? On 2011 May 25, at 06:06, Mark Wright wrote:
Hi Jacek and Gwern,
In the upgrade from mueval from 0.8 to 0.8.1, some of the mueval command line options were changed:
--loadfile => --load-file --noimports => --no-imports
For Plugins/Check.hs I change --loadfile to -l.
To convince lambdabot to run on gentoo, I patch it to use --no- imports to avoid this problem:
% mueval -e '1 + 2' Ambiguous module name `Control.Monad.Cont': it was found in multiple packages: monads-fd-0.1.0.2 mtl-2.0.1.0 monads-tf-0.1.0.0 %
And I patch the lambdabot /usr/share/lambdabot-4.2.3.2/ghc-7.0.3/ State/L.hs to used -XPackageImports. Then mueval works:
% mueval --no-imports -l ~/.lambdabot/State/L.hs -e '1 + 2' 3 %
And lambdabot works:
% lambdabot Initialising plugins ................................................... done. lambdabot> @check True +++ OK, passed 100 tests. "OK, passed 100 tests." lambdabot>
The patch is here:
https://github.com/markwright/gentoo-haskell/blob/master/dev-haskell/lambdab...
Regards, Mark

On Wed, 25 May 2011 13:20:19 +0200, Jacek Generowicz
Hi Mark,
Thanks for your wonderfully lucid, concise and complete explanation of the problem and its solution (included below).
When I apply your patch and reinstall lambabot, I now get the following problem:
lambdabot> check True Could not find module `ShowIO`: It is a member of the hidden package `show-0.3.4`. Use -v to see a list of the files searched for.
I recognize the message about -v as a ghci one. How could I inject this -v into lambabot ?
Hi Jacek, I don't know how to inject the -v into lambdabot, I guess I must of debugged this earlier by grep'ing in the lambdabot and show source files for ShowIO.
I get the same error on both of the machines on which I am trying this. On one of them I already have show-0.3.4 and show-0.4.1.1, on the other I have only show-0.4.1.1.
Any suggestions?
The show module names were changed in the upgrade from show 0.3.4 to
show 0.4.1.1. On gentoo I conditionally sed lambdabot to account
for this, then print out a note that the user may need to copy
the State/* files, in particular L.hs and Pristine.hs for this problem,
to ~/.lambdabot/State.
src_prepare() {
cd "${S}"
epatch "${FILESDIR}/${P}-eval.patch"
if has_version "
On 2011 May 25, at 06:06, Mark Wright wrote:
Hi Jacek and Gwern,
In the upgrade from mueval from 0.8 to 0.8.1, some of the mueval command line options were changed:
--loadfile => --load-file --noimports => --no-imports
For Plugins/Check.hs I change --loadfile to -l.
To convince lambdabot to run on gentoo, I patch it to use --no- imports to avoid this problem:
% mueval -e '1 + 2' Ambiguous module name `Control.Monad.Cont': it was found in multiple packages: monads-fd-0.1.0.2 mtl-2.0.1.0 monads-tf-0.1.0.0 %
And I patch the lambdabot /usr/share/lambdabot-4.2.3.2/ghc-7.0.3/ State/L.hs to used -XPackageImports. Then mueval works:
% mueval --no-imports -l ~/.lambdabot/State/L.hs -e '1 + 2' 3 %
And lambdabot works:
% lambdabot Initialising plugins ................................................... done. lambdabot> @check True +++ OK, passed 100 tests. "OK, passed 100 tests." lambdabot>
The patch is here:
https://github.com/markwright/gentoo-haskell/blob/master/dev-haskell/lambdab...
Regards, Mark

On 2011 May 25, at 16:09, Mark Wright wrote:
Hi Jacek,
Hi Mark, Thanks once again for your excellent answer.
The show module names were changed in the upgrade from show 0.3.4 to show 0.4.1.1.
OK, I see that in show.cabal, ShowIO disappears from the exposed- modules section. This is confirmed by the fact that Show.hs has disappeared from the source. The contents of the latter were just a single instance declaration which now appears in ShowFun.hs. From all this I infer that lambdabot uses show, and in the process wants to import ShowIO: Such imports are indeed found in State/L.hs and State/Pristine.hs. Given that everything that used to live in ShowIO has been swallowed by ShowFun, we could just import ShowFun at those to place instead.
On gentoo I conditionally sed lambdabot to account for this, then print out a note that the user may need to copy the State/* files, in particular L.hs and Pristine.hs for this problem,
With you so far ..
to ~/.lambdabot/State.
Huh? is ~/.<packagename>/ some sort of cabal convention? Or are you using it as a shorthand for ~/.cabal/packages/<yaddayadda>/<packagename> ? Or is it some way in which you *could* organize your Cabal packages which happens to be different from what I have on my systems (by default)? Ah, it is nothing to do with cabal, it's just lambdabot's personal data! (Which needs to have State/L.hs in it. It seems to work without Pristine.hs. Fine, at this stage I'm just prepared to accept this directory as magic). I seem to have a working lambabot check. (i.e. 'lambdabot> check True' claims to pass 100 tests.) Thank you.
participants (3)
-
Gwern Branwen
-
Jacek Generowicz
-
Mark Wright