Matcher

trait Matcher[Edge, Node, Label, Evidence] extends CheckerCats
class CheckerCats
trait Checker
class Object
trait Matchable
class Any

Type members

Types

type Attempt_ = Attempt[Node, Label]
type CheckTyping = Check[Typing_]
type Config = (Schema_, Graph_)
type Env = Typing_
type Graph_ = Graph[Edge, Node]
type Log = MatcherLog[Edge, Node, Label, Evidence]
type LogMessage = (Attempt_, String)
type Schema_ = Schema[Edge, Node, Label, Err, Evidence]
type Triples_ = Set[(Node, Edge, Node)]
type Typing_ = Typing[Node, Label, Err, Evidence]

Inherited types

type Check[A] = EitherT[WriterEC, Err, A]
Inherited from
CheckerCats
type Err
Inherited from
Checker
type ReaderConfig[A] = Kleisli[[A] =>> IO[A], Config, A]
Inherited from
CheckerCats
type ReaderEC[A] = Kleisli[ReaderConfig, Env, A]
Inherited from
CheckerCats
type WriterEC[A] = WriterT[ReaderEC, Log, A]
Inherited from
CheckerCats

Value members

Abstract methods

def matchNodeLabel(node: Node, label: Label): Check[Typing[Node, Label, Err, Evidence]]

Concrete methods

def getGraph: Check[Graph_]
def getSchema: Check[Schema_]
def getTyping: Check[Typing[Node, Label, Err, Evidence]]

Inherited methods

def addLog(log: Log): Check[Unit]
Inherited from
CheckerCats
def attempt[A](c: Check[A]): Check[Either[Err, A]]
Inherited from
CheckerCats
def checkAll[A](xs: List[Check[A]]): Check[List[A]]

Checks all elements in a list If any of the elements fail, fails

Checks all elements in a list If any of the elements fail, fails

Inherited from
CheckerCats
def checkAllFailFAtFirstFlag[A, B, F[_]](ls: => LazyList[A], check: A => F[(B, Boolean)], last: => B)(implicit evidence$5: Monoid[B], evidence$6: Monad[F]): F[(B, Boolean)]
Inherited from
CheckerCats
def checkAllFlag[A, B, F[_]](ls: => LazyList[A], check: A => F[(B, Boolean)], last: => B)(implicit evidence$3: Monoid[B], evidence$4: Monad[F]): F[(B, Boolean)]
Inherited from
CheckerCats
def checkList[A, B](ls: List[A], check: A => Check[B]): Check[List[B]]
Inherited from
CheckerCats
def checkLs[A](cs: List[Check[A]]): Check[List[A]]

Given a list of checks, return the list of values that pass It never fails (in case of failure, it ignores the value)

Given a list of checks, return the list of values that pass It never fails (in case of failure, it ignores the value)

Inherited from
CheckerCats
def checkOneOf[A](cs: List[Check[A]], errNone: Err, errMoreThanOne: List[A] => Err): Check[A]
Inherited from
CheckerCats
def checkPair1st[A, B](p: (Check[A], B)): Check[(A, B)]
Inherited from
CheckerCats
def checkPair2nd[A, B](p: (A, Check[B])): Check[(A, B)]
Inherited from
CheckerCats
def checkSequenceFlag[A, F[_]](ls: => List[F[(A, Boolean)]], last: A)(implicit evidence$7: Monoid[A], evidence$8: Monad[F]): F[(A, Boolean)]
Inherited from
CheckerCats
def checkSome[A](cs: LazyList[Check[A]])(implicit ev: Monoid[Err]): Check[A]
Inherited from
CheckerCats
def checkSome[A](cs: List[Check[A]], errorIfNone: Err): Check[A]
Inherited from
CheckerCats
def checkSomeFlag[A, B, F[_]](ls: => LazyList[A], check: A => F[(B, Boolean)], last: F[(B, Boolean)])(implicit evidence$1: Monad[F]): F[(B, Boolean)]

Given a computation check that returns a pair of value and a flag, returns the first value whose flag is true If none is true, returns the value of the computation parameter last

Given a computation check that returns a pair of value and a flag, returns the first value whose flag is true If none is true, returns the value of the computation parameter last

Inherited from
CheckerCats
def checkSomeFlagCount[A, B](ls: => LazyList[A], check: A => Check[(B, Boolean)], last: B)(implicit evidence$2: Monoid[B]): Check[(B, Int)]
Inherited from
CheckerCats
def cond[A, B](check: Check[A], thenPart: A => Check[B], elsePart: Err => Check[B]): Check[B]

Attempts to execute a check If it fails, applies thenPart to the result, otherwise applies elsePart to the error

Attempts to execute a check If it fails, applies thenPart to the result, otherwise applies elsePart to the error

Type Params
A

type returned by the computation

B

type returned the the condition

Value Params
check

Computation to check

elsePart

part to be executed when the check fails

thenPart

part to be executed when it passes

Inherited from
CheckerCats
def condFlag[A, B](check: Check[A], thenPart: A => Check[B], elsePart: Err => Check[B]): Check[(B, Boolean)]
Inherited from
CheckerCats
def err[A](e: Err): Check[A]
Inherited from
CheckerCats
def filterSuccess[A, B](ls: List[A], check: A => Check[B]): Check[List[(A, B)]]

Returns the list of values whose computation is successful

Returns the list of values whose computation is successful

Type Params
A

type of values

B

type returned by computation

Value Params
check

computation to check for each value

ls

list of values

Returns

a computation with a list of pairs for whom the computation was successful

Inherited from
CheckerCats
def fromEither[A](e: Either[Err, A]): Check[A]
Inherited from
CheckerCats
def fromEitherIO[A](e: EitherT[[A] =>> IO[A], Err, A]): Check[A]
Inherited from
CheckerCats
def fromIO[A](io: IO[A]): Check[A]
Inherited from
CheckerCats
def getConfig: Check[Config]
Inherited from
CheckerCats
def getEnv: Check[Env]
Inherited from
CheckerCats
def local[A](f: Env => Env)(c: Check[A]): Check[A]
Inherited from
CheckerCats
def mkErr[F[_]](e: Err)(implicit evidence$9: Applicative[F]): F[Err]
Inherited from
CheckerCats
def ok[A](x: A): Check[A]
Inherited from
CheckerCats
def optCheck[A, B](c: Option[A], check: A => Check[B], default: => Check[B]): Check[B]

If c is some value, applies check, otherwise applies default

If c is some value, applies check, otherwise applies default

Value Params
c

Optional value

check

check function

default

value in case there is no option

Inherited from
CheckerCats
def orElse[A](c1: Check[A], c2: => Check[A]): Check[A]
Inherited from
CheckerCats
def readerConfig2check[A](c: ReaderConfig[A]): Check[A]
Inherited from
CheckerCats
def readerConfig2readerEC[A](c: ReaderConfig[A]): ReaderEC[A]
Inherited from
CheckerCats
def readerEC2check[A](c: ReaderEC[A]): Check[A]
Inherited from
CheckerCats
def readerEC2writer[A](c: ReaderEC[A]): WriterEC[A]
Inherited from
CheckerCats
def run[A](c: Check[A])(config: Config)(env: Env): IO[(Log, Either[Err, A])]
Inherited from
CheckerCats
def runCheck[A](c: Check[A])(config: Config)(env: Env): IO[(Either[Err, A], Log)]
Inherited from
Checker
def runLocal[A](c: Check[A], f: Env => Env): Check[A]
Inherited from
CheckerCats
def runLocalSafe[A](c: Check[A], f: Env => Env, safe: (Err, Env) => A): Check[A]

Run a computation in a local environment. If the computation fails, return the result of calling safe function over the current environment

Run a computation in a local environment. If the computation fails, return the result of calling safe function over the current environment

Value Params
c

computation to run

f

environment

safe

function to call if the computation fails

Inherited from
CheckerCats
def runLocalW[A](f: Env => Env)(c: WriterEC[A]): WriterEC[A]
Inherited from
CheckerCats
def runLog[A](c: Check[A])(config: Config)(env: Env): IO[Log]
Inherited from
Checker
def runValue[A](c: Check[A])(config: Config)(env: Env): IO[Either[Err, A]]
Inherited from
Checker
def sequence[A](xs: List[Check[A]]): Check[List[A]]
Inherited from
CheckerCats
def validateCheck(condition: Boolean, e: Err): Check[Unit]
Inherited from
CheckerCats
def writerEC2check[A](c: WriterEC[A]): Check[A]
Inherited from
CheckerCats

Inherited fields

lazy protected val mWriterEC: Monad[WriterEC]
Inherited from
CheckerCats

Implicits

Implicits

implicit val envMonoid: Monoid[Env]
implicit val logMonoid: Monoid[Log]
implicit val logShow: Show[Log]
implicit val typingShow: Show[Env]