trait MessageParser[A] extends AnyRef

MessageParser is a typeclass to simplify parsing messages. It can derive instances for any ADT, and makes it much easier to work with messages.

A

The type to parse.

Self Type
MessageParser[A]
Source
MessageParser.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MessageParser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def parse[F[_]](implicit c: CacheSnapshot, F: Monad[F], E: ApplicativeHandle[F, String], S: MonadState[F, List[String]]): F[A]

    A program to parse a message into the needed types.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[B](that: MessageParser[B]): MessageParser[(A, B)]

    Runs another parser after this one.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def collectWithError[B](error: String)(pf: PartialFunction[A, B]): MessageParser[B]

    Apply a partial function of this parser, returning the error if the function isn't defined.

    Apply a partial function of this parser, returning the error if the function isn't defined.

    B

    The new parser type.

    error

    The error to return if the partial function isn't defined.

    pf

    The partial function to apply.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def filterWithError(f: (A) => Boolean, error: String): MessageParser[A]

    Create a new parser by filtering the values created by this parser.

    Create a new parser by filtering the values created by this parser.

    f

    The predicate.

    error

    The error message if the value does not match the predicate.

  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def orElse[B](that: MessageParser[B]): MessageParser[Either[A, B]]

    Try another parser if this one fails.

  19. def orElseWith[B, C](that: MessageParser[B])(f: (Either[A, B]) => C): MessageParser[C]

    Try another parser if this one fails, and combine their types.

  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped