irc-0.6.1.0: A small library for parsing IRC messages.

Safe Haskell | Safe
Language | Haskell2010

Network.IRC.Parser

Contents

- Parsing and Formatting Functions
- Parsec Combinators for Parsing IRC messages
- Deprecated Functions

Description

Parsec parsers and a general parsing interface for IRC messages

Synopsis

- decode :: ByteString -> Maybe Message
- prefix :: Parser Prefix
- serverPrefix :: Parser Prefix
- nicknamePrefix :: Parser Prefix
- command :: Parser Command
- parameter :: Parser Parameter
- message :: Parser Message
- crlf :: Parser ()
- spaces :: Parser ()
- parseMessage :: ByteString -> Maybe Message

# Parsing and Formatting Functions

decode Source #

Arguments

:: ByteString | Message string
-> Maybe Message | Parsed message

Parse a String into a Message.

# Parsec Combinators for Parsing IRC messages

prefix :: Parser Prefix Source #

Parse a Prefix

serverPrefix :: Parser Prefix Source #

Parse a Server prefix

nicknamePrefix :: Parser Prefix Source #

Parse a NickName prefix

command :: Parser Command Source #

Parse a command. Either a string of capital letters, or 3 digits.

parameter :: Parser Parameter Source #

Parse a command parameter.

message :: Parser Message Source #

Parse a Message

crlf :: Parser () Source #

Parse a cr lf

spaces :: Parser () Source #

Consume only spaces, tabs, or the bell character

# Deprecated Functions

parseMessage :: ByteString -> Maybe Message Source #

The deprecated version of decode