lambdabot: Lambdabot is a development tool and advanced IRC bot

[ development, program, web ] [ Propose Tags ] [ Report a vulnerability ]

Lambdabot is an IRC bot written over several years by those on the #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.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 4.0, 4.1, 4.2.1, 4.2.2, 4.2.2.1, 4.2.3.0, 4.2.3.1, 4.2.3.2, 4.2.3.3, 4.3, 4.3.0.1, 5.0, 5.0.1, 5.0.2, 5.0.2.1, 5.0.2.2, 5.0.3, 5.1, 5.1.0.1, 5.1.0.2, 5.1.0.4, 5.2, 5.3, 5.3.0.1, 5.3.0.2, 5.3.1, 5.3.1.1, 5.3.1.2 (info)
Change log Changelog
Dependencies base (>=3 && <5), lambdabot-core (>=5.3 && <5.4), lambdabot-haskell-plugins (>=5.3 && <5.4), lambdabot-irc-plugins (>=5.3 && <5.4), lambdabot-misc-plugins (>=5.3 && <5.4), lambdabot-novelty-plugins (>=5.3 && <5.4), lambdabot-reference-plugins (>=5.3 && <5.4), lambdabot-social-plugins (>=5.3 && <5.4), mtl (>=2) [details]
Tested with ghc ==8.2.2, ghc ==8.4.4, ghc ==8.6.5, ghc ==8.8.4, ghc ==8.10.4, ghc ==9.0.2, ghc ==9.2.4, ghc ==9.4.5, ghc ==9.6.3
License LicenseRef-GPL
Author James Cook
Maintainer Naïm Favier <n@monade.li>
Category Development, Web
Home page https://wiki.haskell.org/Lambdabot
Bug tracker https://github.com/lambdabot/lambdabot/issues
Source repo head: git clone https://github.com/lambdabot/lambdabot.git
Uploaded by ncfavier at 2023-11-10T16:54:59Z
Distributions Debian:5.3.0.1, NixOS:5.3.1.2
Reverse Dependencies 1 direct, 0 indirect [details]
Executables lambdabot
Downloads 19473 total (106 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2023-11-10 [all 2 reports]

Readme for lambdabot-5.3.1.2

[back to package description]

About Lambdabot

Lambdabot is an IRC bot written over several years by those on the Libera's (formerly freenode's) #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.

Installation

The easiest way to install lambdabot is from hackage, by the following commands,

cabal v1-install lambdabot
hoogle data

or, using v2 commands:

cabal v2-install lambdabot hoogle misfortune mueval unlambda dice
hoogle data
cabal v2-install --lib lambdabot-trusted random mtl show

The second command fetches the data for Lambdabot's @hoogle command, which is a thin wrapper around the hoogle command line tool. Invoking lambdabot will (hopefully) display a lambdabot> prompt.

It is also possible to install lambdabot in a sandbox. In that case, use cabal exec lambdabot to launch lambdabot.

Files

Some lambdabot modules maintain state. The state is stored in ./State/ if that directory exits; otherwise, it will end up on ~/.lambdabot/State/. State files of particular interest are:

  • Pristine.hs and L.hs: Environment for running Haskell code. The command @let adds new definitions to L.hs, whereas @undefine copies Pristine.hs to L.hs.
  • offlinerc: This file contains a history of commands typed into lambdabot's tty interface.

Customization

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.

Using Lambdabot

Lambdabot has a number of modules, most of which provide several commands. Type @listmodules to obtain a list of module names, and then @list <module> to list a module's commands. Executing @help command 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

Further Information