{- | Smart constructor for Channels, only allow correct IRC channels to be
 - constructed. -}
channel :: String
    -- ^ Source text of Channel.
    -> Maybe Channel
channel chan = case P.parse (PU.channel <* P.eof) "(channel source)" chan of
    Right c -> return $ Channel c
    Left _ -> Nothing

{- | Get the actual channel from the Channel type. -}
channel :: String
    -- ^ Source text of Channel.
    -> Maybe Channel
channel chan = case P.parse (PU.channel <* P.eof) "(channel source)" chan of
    Right c -> return $ Channel c
    Left _ -> Nothing

{- | Get the actual channel from the Channel type. -}
channel chan = case P.parse (PU.channel <* P.eof) "(channel source)" chan of
    Right c -> return $ Channel c
    Left _ -> Nothing

{- | Get the actual channel from the Channel type. -}