Lambdabot is an IRC bot written over several years by those on the Freenode
#haskell IRC channel.
It operates as a command line tool, embedded in an editor, embedded in GHCi, via internet relay chat and on the web.
The easiest way to install
lambdabot is from hackage, by the following
cabal install --constraint 'transformers installed' lambdabot djinn hoogle data
The second command fetches the data for Lambdabot’s
@hoogle command, which
is a thin wrapper around the
command line tool. Invoking
lambdabot will (hopefully) display a
It is also possible to install lambdabot in a sandbox. In that case, use
cabal exec lambdabot to launch lambdabot.
Some lambdabot modules maintain state. The state is stored in
if that directory exits; otherwise, it will end up on
State files of particular interest are:
L.hs: Environment for running Haskell code. The command
@letadds new definitions to
offlinerc: This file contains a history of commands typed into lambdabot’s tty interface.
The state file
Pristine.hs defines the environment in which Haskell code
is run. To customize lambdabot’s modules, unpack the lambdabot package
cabal unpack lambdabot; cd lambdabot-<version>
You can then edit
src/Modules.hs to configure the loaded modules.
Lambdabot has a number of modules, most of which provide several commands.
@listmodules to obtain a list of module names, and then
@list <module> to list a module’s commands. Executing
displays a short description of the command.
The following sample session demonstrates some useful lambdabot commands.
lambdabot> > sum [1..10] 55 lambdabot> @let foo = 42 lambdabot> > product [1..foo] 1405006117752879898543142606244511569936384000000000 lambdabot> @undefine Not in scope:‘foo’ Perhaps you meant ‘Data.Traversable.for’ (imported from Data.Traversable) lambdabot> @type map (a -> b) -> [a] -> [b] lambdabot> @djinn (b -> c) -> (a -> b) -> a -> c f a b c = a (b c) lambdabot> @pl \x y z -> y z x flip flip lambdabot> @unpl flip flip (\ b c f -> c f b) lambdabot> @undo do x <- step1; step2; step3 step1 >>= \ x -> step2 >> step3
* support ghc-8.4
* #155, #163, #164, #168, #169, #170
* support ghc-8.0
* support haskell-src-exts 1.18+
* better oeis output
* #141, #149
* support for dependent-sum 0.3 (#130)
* IRC reconnect support (#125, by Nikolay Amiantov)
* unmtl parsing fix (#129, by Daniel Wagner)
* #131, #138, #139, #140, #142, #143
* compatibility with ghc-7.10: relax utf8-string upper bound
* numerous bugfixes (#121, #122, #123, #117, #98)
* update Changelog
* use QuickCheck-safe for @check command
* ship ghc version specific Pristen.hs files
* the dict plugin no longer looks up more than one word at a time
* update to monad-control-1.0
* if ./State/ exists, then state files are stored there even if a
corresponding file exists in ~/.lambdabot/State