lambdabot- Lambdabot is a development tool and advanced IRC bot

Safe HaskellNone



Nickname equality subsystem.

This component is responsible for deciding whether two nicknames refer to the same person, for the purposes of tell et al. Nickname equality must be monadic because it uses mutable state maintained by the link and unlink commands. Also provided is a concept of polynicks (by analogy to polytypes); polynicks can refer to an (open) set of nicknames. For instance 'tell *lambdabot Why does X do Y' could tell a message to anyone who has identified as a lambdabot maintainer. A polynick consists of a bar-separated list of (nicks or open terms); an open term is like a nick but preceded with a star.



data Polynick Source


nickMatches :: LB (Nick -> Polynick -> Bool)Source

Determine if a nick matches a polynick. The state is read at the point of binding.

readPolynick :: Message a => a -> String -> PolynickSource

Parse a read polynick.

showPolynick :: Message a => a -> Polynick -> StringSource

Format a polynick.

lookupMononickMap :: LB (Polynick -> Map Nick a -> [(Nick, a)])Source

Lookup (using a polynick) in a map keyed on mononicks.

mononickToPolynick :: Nick -> PolynickSource

Convert a regular mononick into a polynick.