irc-core-2.8: IRC core library for glirc
Copyright(c) Eric Mertens 2016
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Irc.Codes

Description

This module defines support for working with IRC's numeric reply codes. Pattern synonyms are provided for each of the possible IRC reply codes.

Reply code information was extracted from https://www.alien.net.au/irc/irc2numerics.html

Synopsis

Documentation

newtype ReplyCode Source #

Type of numeric reply codes

Constructors

ReplyCode Word 

Instances

Instances details
Eq ReplyCode Source # 
Instance details

Defined in Irc.Codes

Methods

(==) :: ReplyCode -> ReplyCode -> Bool

(/=) :: ReplyCode -> ReplyCode -> Bool

Ord ReplyCode Source # 
Instance details

Defined in Irc.Codes

Methods

compare :: ReplyCode -> ReplyCode -> Ordering

(<) :: ReplyCode -> ReplyCode -> Bool

(<=) :: ReplyCode -> ReplyCode -> Bool

(>) :: ReplyCode -> ReplyCode -> Bool

(>=) :: ReplyCode -> ReplyCode -> Bool

max :: ReplyCode -> ReplyCode -> ReplyCode

min :: ReplyCode -> ReplyCode -> ReplyCode

Read ReplyCode Source #

Reads only the number

Instance details

Defined in Irc.Codes

Methods

readsPrec :: Int -> ReadS ReplyCode

readList :: ReadS [ReplyCode]

readPrec :: ReadPrec ReplyCode

readListPrec :: ReadPrec [ReplyCode]

Show ReplyCode Source #

Shows number

Instance details

Defined in Irc.Codes

Methods

showsPrec :: Int -> ReplyCode -> ShowS

show :: ReplyCode -> String

showList :: [ReplyCode] -> ShowS

data ReplyType Source #

Categories for reply codes

Constructors

ClientServerReply

0-99 Messages between client and server

CommandReply

200-399 Responses to commands

ErrorReply

400-599 Errors

UnknownReply

Uncategorized

Instances

Instances details
Eq ReplyType Source # 
Instance details

Defined in Irc.Codes

Methods

(==) :: ReplyType -> ReplyType -> Bool

(/=) :: ReplyType -> ReplyType -> Bool

Ord ReplyType Source # 
Instance details

Defined in Irc.Codes

Methods

compare :: ReplyType -> ReplyType -> Ordering

(<) :: ReplyType -> ReplyType -> Bool

(<=) :: ReplyType -> ReplyType -> Bool

(>) :: ReplyType -> ReplyType -> Bool

(>=) :: ReplyType -> ReplyType -> Bool

max :: ReplyType -> ReplyType -> ReplyType

min :: ReplyType -> ReplyType -> ReplyType

Read ReplyType Source # 
Instance details

Defined in Irc.Codes

Methods

readsPrec :: Int -> ReadS ReplyType

readList :: ReadS [ReplyType]

readPrec :: ReadPrec ReplyType

readListPrec :: ReadPrec [ReplyType]

Show ReplyType Source # 
Instance details

Defined in Irc.Codes

Methods

showsPrec :: Int -> ReplyType -> ShowS

show :: ReplyType -> String

showList :: [ReplyType] -> ShowS

data ReplyCodeInfo Source #

Information describing the category and human decipherable name of a reply.

Constructors

ReplyCodeInfo 

Fields

Instances

Instances details
Eq ReplyCodeInfo Source # 
Instance details

Defined in Irc.Codes

Ord ReplyCodeInfo Source # 
Instance details

Defined in Irc.Codes

Read ReplyCodeInfo Source # 
Instance details

Defined in Irc.Codes

Methods

readsPrec :: Int -> ReadS ReplyCodeInfo

readList :: ReadS [ReplyCodeInfo]

readPrec :: ReadPrec ReplyCodeInfo

readListPrec :: ReadPrec [ReplyCodeInfo]

Show ReplyCodeInfo Source # 
Instance details

Defined in Irc.Codes

Methods

showsPrec :: Int -> ReplyCodeInfo -> ShowS

show :: ReplyCodeInfo -> String

showList :: [ReplyCodeInfo] -> ShowS

replyCodeInfo :: ReplyCode -> ReplyCodeInfo Source #

Compute information for a reply code

defaultReplyCodeInfo :: Int -> ReplyCodeInfo Source #

Categorize a reply code using the unknown category and simply showing the reply code's number as its name.

replyCodeInfoTable :: Vector ReplyCodeInfo Source #

Information about reply codes as derived from Freenode's ircd-seven.