[Haskell-cafe] lambdabot check
Mark Wright
markwright at internode.on.net
Wed May 25 16:09:41 CEST 2011
On Wed, 25 May 2011 13:20:19 +0200, Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
> 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 "<dev-haskell/mtl-2.0.0.0"; then
epatch "${FILESDIR}/${P}-mtl-1.patch"
fi
if has_version ">=dev-haskell/show-0.4.1.1"; then
sed -e 's at import ShowIO at import ShowFun@' \
-i "${S}/State/L.hs" \
-i "${S}/State/Pristine.hs" \
|| die "Could patch State/L.hs and State/Pristine.hs for show upgrade"
fi
}
pkg_postinst() {
ghc-package_pkg_postinst
elog "It may be necessary to: mkdir -p ~/.lambdabot/State && cp /usr/share/lambdabot-*/ghc-*/State/* ~/.lambdabot/State"
}
Thanks, Mark
PS the lambdabot gentoo ebuild is here:
https://github.com/gentoo-haskell/gentoo-haskell/blob/57501a585edd8587d89ed64b43f6b4876316e6f7/dev-haskell/lambdabot/lambdabot-4.2.3.2.ebuild
> 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/lambdabot/files/lambdabot-4.2.3.2-eval.patch
> >
> > Regards, Mark
> >
> >
>
More information about the Haskell-Cafe
mailing list