[Haskell-cafe] lambdabot check

Mark Wright markwright at internode.on.net
Wed May 25 06:06:30 CEST 2011


On Wed, 25 May 2011 02:15:12 +0200, Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
> 
> 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 "<IO <>>".
> 
> 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/lambdabot/files/lambdabot-4.2.3.2-eval.patch

Regards, Mark





More information about the Haskell-Cafe mailing list