Skip to content

Instantly share code, notes, and snippets.

@funrep
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funrep/8883563 to your computer and use it in GitHub Desktop.
Save funrep/8883563 to your computer and use it in GitHub Desktop.
*Main> main
> NICK tob
> USER tob 0 * :tob
:irc.codetalk.io NOTICE AUTH :*** Looking up your hostname...
failed to parse
:irc.codetalk.io NOTICE AUTH :*** Couldn't resolve your hostname; using your IP address instead
failed to parse
PING :D433C6EE
failed to parse
^CInterrupted.
*Main> import Data.Text (pack)
*Main Data.Text> import Tob.Parser
*Main Data.Text Tob.Parser> parseIRC $ pack ":irc.codetalk.io NOTICE AUTH :*** Looking up your hostname...\r\n"
Just (Message {prefix = Just (Prefix {addr = "irc.codetalk.io", user = Nothing, nick = Nothing}), cmd = Action "NOTICE", params = ["AUTH"], msg = Just "*** Looking up your hostname..."})
*Main Data.Text Tob.Parser> parseIRC $ pack "PING :D433C6EE\r\n"
Just (Message {prefix = Nothing, cmd = Action "PING", params = [], msg = Just "D433C6EE"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment