Either of Non-empty Seq (Like poor man's version of ValidationNel from scalaz)
Either of Non-empty Seq (Like poor man's version of ValidationNel from scalaz)
Provides a generic way of lifting A into a container for which a RefInfoType instance can be retrieved.
Provides a generic way of lifting A and B into a container for which a RefInfoType instance can be retrieved.
Get reflection information about scala.
Get reflection information about scala.util.Either.
left type parameter of Either
right type parameter of Either
reflection information about scala.util.Either
Get reflection info from a simple Class.
Get reflection info from a simple Class. Will throw an exception if we find that the type is parametrized.
the type of the RefInfoType to create
a Class object
reflection information about simple type represented by clazz.
Get reflection information about com.eharmony.aloha.semantics.func.GenAggFunc
Get reflection information about com.eharmony.aloha.semantics.func.GenAggFunc
function input type
function output type
reflection information about com.eharmony.aloha.semantics.func.GenAggFunc
Attempt to determine if possibleIterable
is a scala.collection.immutable.Iterable[A]
but not
a scala.collection.Map
.
Attempt to determine if possibleIterable
is a scala.collection.immutable.Iterable[A]
but not
a scala.collection.Map
.
This is kind of a stopgap solution because the subtype operator <:<
doesn't really work well
for Manifests. This is an issue because currently, Aloha uses Manifests rather than
TypeTag
s for type checking. Comments in ClassManifestDeprecatedApis says:
"this part is wrong for punting unless the rhs has no type arguments, but it's better than a blindfolded pinata swing."
This implementation covers many simple cases in the intersection of scala 2.10 and 2.11 instances. See test for coverage.
element type
possible iterable type.
RefInfo instance of element type
a possible Iterable
true if possibleIterable
is a scala.collection.immutable.Iterable[A]
but not a scala.collection.Map[_, _]
.
Is Sub a subtype of Super
Is Sub a subtype of Super
subtype in test
supertype in test
RefInfo instance of type A
RefInfo instance of type A
Like l.
Like l.map(f).sequence[({type L[+A] = Either[Seq[String], A]})#L, C ] in scalaz except that it short circuits if it finds an error. (There must be some better way to do this w/ scalaz).
If we put a println("folding") at the top of the inner function h, we would get the following:
scala> mapSeq(Left(Seq("1")) +: (2 to 3).map(Right(_)))(identity) // Only 1 "folding" instead of 3. folding res0: ENS[Seq[Int]] = Left(List(0)) scala> mapSeq((1 to 3).map(Right(_)))(identity) folding folding folding res1: ENS[Seq[Int]] = Right(List(1, 2, 3))
type of values in the input sequence in the first parameter list.
type of values in the output sequence if successful.
list of values to which f should be applied.
function to map over l
Get reflection information about Option.
Get reflection information about Option.
type of Option
reflection information about Option.
Get the RefInfoType instance for type A.
Get the RefInfoType instance for type A.
type for which reflection information should be retrieved.
Get a string representation of the RefInfoType.
Get a string representation of the RefInfoType. This should be adequate to full characterize the type and any type parameters (i.e., should contain the erased type information)
type of the reflected object whose string-based representation the function is retrieving.
string-based representation of A
Get reflection information about scalaz.
Get reflection information about scalaz.Validation.
left type parameter of Validation
right type parameter of Validation
reflection information about scalaz.Validation
Get reflection information about scalaz.
Get reflection information about scalaz.ValidationNel.
left type parameter of ValidationNel
right type parameter of ValidationNel
reflection information about scalaz.ValidationNel
Provides a generic mechanism to wrap the types A and B inside a container taking two parameters.
Provides a generic mechanism to wrap the types A and B inside a container taking two parameters.
val w = RefInfoOps.wrap[String, Double] // pass around w to some other object ... val e: RefInfo[Either[String, Double]] = w.in[Either] import scalaz.Validation val v1 = RefInfoOps.wrap[String, Double].in[Validation] val v2 = RefInfoOps.validation[String, Double] assert(v1 == v2)
first type being lifted.
second type being lifted.
a Lift2 instance containing information about A and B that can be used to later construct a RefInfoType from a kind passed to the in function.
Get a Lift1 instance to wrap type A in a RefInfoType.
Get a Lift1 instance to wrap type A in a RefInfoType.
val w = RefInfoOps.wrap[String] val o1 = w.in[Option] val o2 = RefInfoOps.option[String] assert(o1 == o2)
type being lifted
Concrete implementations for retrieving and manipulating reflection meta information. All reflection in the library should use this facade and should not use Manifests or TypeTags.