Package

typequux

constraint

Permalink

package constraint

Visibility
  1. Public
  2. All

Type Members

  1. trait AppendConstraint[-A, -B, +R] extends AnyRef

    Permalink

    Typeclass to append two objects.

    Typeclass to append two objects.

    Author:

    Harshad Deo

    A

    type of object in the front

    B

    type of object in the rear

    R

    type of the result

    Since

    0.1

  2. trait ApplyConstraint[F, In, Out] extends AnyRef

    Permalink

    Typeclass for function application.

    Typeclass for function application.

    Author:

    Harshad Deo

    F

    Type of the Function

    In

    Type of the Input

    Out

    Type Output

    Since

    0.1

  3. trait AtConstraint[N, HL, At] extends AnyRef

    Permalink

    Typeclass to get an element given an index.

    Typeclass to get an element given an index. For sequentially indexed objects like HList and Tuples, index is, by convention, 0-based from the beginning.

    Author:

    Harshad Deo

    N

    Type of the Index

    HL

    Type of the object from which the element is retrieved

    At

    Type of the result

    Since

    0.1

  4. trait AtRightConstraint[N, HL, A] extends AnyRef

    Permalink

    Typeclass to get an element from an object that supports sequential indexing, like HList and Tuples.

    Typeclass to get an element from an object that supports sequential indexing, like HList and Tuples. By convention, the index is 0-based and from the right or the end.

    Author:

    Harshad Deo

    N

    Type of the index

    HL

    Type of the object from which the element is retrieved

    A

    Type of the result

    Since

    0.1

  5. trait ConsConstraint[T, U, R] extends AnyRef

    Permalink

    Typeclass to add an element at the head of an object.

    Typeclass to add an element at the head of an object.

    Author:

    Harshad Deo

    T

    Type of the head

    U

    Type of the object to which the consing is done

    R

    Type of the result

    Since

    0.1

  6. trait CountConstraint[T, C] extends AnyRef

    Permalink

    Typeclass to count the number of elements satisfying a given predicate, given that each element of the object can be converted implicitly to a common class C.

    Typeclass to count the number of elements satisfying a given predicate, given that each element of the object can be converted implicitly to a common class C. Default implementation is provided in the companion object.

    Author:

    Harshad Deo

    T

    Type of the object on which the count operation is applied, like a HList or a Tuple

    C

    Common type to which the elements of T can be converted

    Since

    0.1

  7. trait DownTransformConstraint[-INP, +OP, +M[_]] extends AnyRef

    Permalink

    Typeclass to remove all elements of an object from their context, for example converting.

    Typeclass to remove all elements of an object from their context, for example converting.

    List[Int] :+: List[String] :+: HNil to Int :+: String :+: HNil.

    Is a dangerous operation and should be used with caution and the appropriate guards.

    Author:

    Harshad Deo

    INP

    Type of the object whose elements are to be downtransformed

    OP

    Type of the resulting object

    M

    Type of the context

    Since

    0.1

  8. trait DropConstraint[N, HL, R] extends AnyRef

    Permalink

    Typeclass to remove a type-indexed number of elements from the left of a sequentially indexed object, like a HList or a tuple.

    Typeclass to remove a type-indexed number of elements from the left of a sequentially indexed object, like a HList or a tuple. By convention, indexes are 0-based.

    Author:

    Harshad Deo

    N

    Type index of the elements to be dropped

    HL

    Type of the object from which the elements are to be dropped

    R

    Type of the result

    Since

    0.1

  9. trait DropRightConstraint[N, HL, R] extends AnyRef

    Permalink

    Typeclass to remove a type-indexed number of elements from the right of a sequentially indexed object, like a HList or a tuple.

    Typeclass to remove a type-indexed number of elements from the right of a sequentially indexed object, like a HList or a tuple. By convention, indexes are 0-based.

    Author:

    Harshad Deo

    N

    Type index of the elements to be dropped

    HL

    Type of the object from which the elements are to be dropped

    R

    Type of the result

    Since

    0.1

  10. trait ExistsConstraint[T, C] extends AnyRef

    Permalink

    Typeclass to check if an element satisfies a given predicate given that each element of the object can be implicitly converted to a type C.

    Typeclass to check if an element satisfies a given predicate given that each element of the object can be implicitly converted to a type C. Default implementation is provided in the companion object.

    Author:

    Harshad Deo

    T

    Type of the object on which the exists operation is applied, like a hlist or a tuple

    C

    Common type to which all elements of T can be converted

    Since

    0.1

  11. trait ExternalUnzipConstraint[-H, +R1, +R2] extends AnyRef

    Permalink

    Typeclass to unzip the elements of an object into two object, for example an HList of Tuple2s into two HLists.

    Typeclass to unzip the elements of an object into two object, for example an HList of Tuple2s into two HLists.

    Author:

    Harshad Deo

    H

    Type of the input object

    R1

    Type of the first object obtained by unzipping

    R2

    type of the second object obtained by unzipping

    Since

    0.1

  12. trait ExternalZipConstraint[-A, -B, +R] extends AnyRef

    Permalink

    Typeclass to zip the elements of two objects, as opposed to zipping all the elements of one object, which is done by the InternalZipConstraint typeclass.

    Typeclass to zip the elements of two objects, as opposed to zipping all the elements of one object, which is done by the InternalZipConstraint typeclass.

    Author:

    Harshad Deo

    A

    Type of the first object to be zipped

    B

    Type of the second object to be zipped

    R

    Type of the result of zipping

    Since

    0.1

  13. trait FoldLeftConstraint[T, Z, C] extends AnyRef

    Permalink

    Typeclass to implement a fold-left style on an object, given that all elements of the object can be implicitly converted to a type C.

    Typeclass to implement a fold-left style on an object, given that all elements of the object can be implicitly converted to a type C. Default implementation is provided in the companion object.

    Author:

    Harshad Deo

    T

    Type of the object on which the fold left operation is applied

    Z

    Type of the result of the left fold

    C

    Common class to which all elements of T can be converted

    Since

    0.1

  14. trait ForallConstraint[T, C] extends AnyRef

    Permalink

    Typeclass to check whether a given predicate holds for all elements of an object, given that each element of the object can be implicitly converted to a type C.

    Typeclass to check whether a given predicate holds for all elements of an object, given that each element of the object can be implicitly converted to a type C. Default implementation is provided in the companion object.

    Author:

    Harshad Deo

    T

    Type of the object on which the operation is being applied

    C

    Common class to which all elements of the object can be converted

    Since

    0.1

  15. trait ForeachConstraint[INP, C] extends AnyRef

    Permalink

    Typeclass to apply an operation to each element of an object, given that all elements of the object can be implicitly converted to a common class C.

    Typeclass to apply an operation to each element of an object, given that all elements of the object can be implicitly converted to a common class C.

    Author:

    Harshad Deo

    INP

    Type of the object to which the operation is being applied

    C

    Common class to which all the elements of the object can be converted

    Since

    0.1

  16. trait IndexFlatMapConstraint[N, HL, At, T, R] extends AnyRef

    Permalink

    Typeclass to map an object at a type-index and then "flatten" the result, conceptually similar to a flatmap By convention, indices are 0-based from the left (beginning).

    Typeclass to map an object at a type-index and then "flatten" the result, conceptually similar to a flatmap By convention, indices are 0-based from the left (beginning).

    Author:

    Harshad Deo

    N

    Index at which insertion happens

    HL

    Type of the object on which the operation is applied

    At

    Type of the object at index specified by N

    T

    Type of the result of applying the mapping function

    R

    Type of the resulting object

    Since

    0.1

  17. trait IndexFlatMapRightConstraint[N, HL, At, T, R] extends AnyRef

    Permalink

    Typeclass to map an object at a type-index and then "flatten" the result, conceptually similar to a flatmap By convention, indices are 0-based from the right (end).

    Typeclass to map an object at a type-index and then "flatten" the result, conceptually similar to a flatmap By convention, indices are 0-based from the right (end).

    Author:

    Harshad Deo

    N

    Index at which insertion happens

    HL

    Type of the object on which the operation is applied

    At

    Type of the object at index specified by N

    T

    Type of the result of applying the mapping function

    R

    Type of the resulting object

    Since

    0.1

  18. trait IndexMapConstraint[N, HL, A, T, R] extends AnyRef

    Permalink

    Typeclass to map an object at a type-index, conceptually similar to a map.

    Typeclass to map an object at a type-index, conceptually similar to a map. By convention, indices are 0-based from the left (beginning).

    Author:

    Harshad Deo

    N

    Index at which insertion happens

    HL

    Type of the object on which the operation is applied

    A

    Type of the object at index specified by N

    T

    Type of the result of applying the mapping function

    R

    Type of the resulting object

    Since

    0.1

  19. trait IndexMapRightConstraint[N, HL, At, T, R] extends AnyRef

    Permalink

    Typeclass to map an object at a type-index, conceptually similar to a map.

    Typeclass to map an object at a type-index, conceptually similar to a map. By convention, indices are 0-based from the right (end).

    Author:

    Harshad Deo

    N

    Index at which insertion happens

    HL

    Type of the object on which the operation is applied

    At

    Type of the object at index specified by N

    T

    Type of the result of applying the mapping function

    R

    Type of the resulting object

    Since

    0.1

  20. trait InsertConstraint[N, HL, T, R] extends AnyRef

    Permalink

    Typeclass to insert an element at a specified type-index.

    Typeclass to insert an element at a specified type-index. By convention, indices are 0-based from the left (beginning).

    Author:

    Harshad Deo

    N

    Index at which the element is to be inserted

    HL

    Type of the object in which the insertion is taking place

    T

    Type of the object being inserted

    R

    Type of the result

    Since

    0.1

  21. trait InsertMConstraint[N, HL, T, R] extends AnyRef

    Permalink

    Typeclass to insert multiple elements at a specified type-index.

    Typeclass to insert multiple elements at a specified type-index. By convention, indices are 0-based from the left (beginning).

    Author:

    Harshad Deo

    N

    Index at which the element is to be inserted

    HL

    Type of the object in which the insertion is taking place

    T

    Type of the object being inserted

    R

    Type of the result

    Since

    0.1

  22. trait InsertMRightConstraint[N, HL, T, R] extends AnyRef

    Permalink

    Typeclass to insert multiple elements at a specified type-index.

    Typeclass to insert multiple elements at a specified type-index. By convention, indices are 0-based from the right(end).

    Author:

    Harshad Deo

    N

    Index at which the element is to be inserted

    HL

    Type of the object in which the insertion is taking place

    T

    Type of the object being inserted

    R

    Type of the result

    Since

    0.1

  23. trait InsertRightConstraint[N, HL, T, R] extends AnyRef

    Permalink

    Typeclass to insert an element at a specified type-index.

    Typeclass to insert an element at a specified type-index. By convention, indices are 0-based from the right (end).

    Author:

    Harshad Deo

    N

    Index at which the element is to be inserted

    HL

    Type of the object in which the insertion is taking place

    T

    Type of the object being inserted

    R

    Type of the result

    Since

    0.1

  24. trait InternalZipConstraint[Z, F, T, V] extends AnyRef

    Permalink

    Typeclass to zip all the elements of an object together, equivalent to an arbitrary-arity zip.

    Typeclass to zip all the elements of an object together, equivalent to an arbitrary-arity zip.

    Author:

    Harshad Deo

    Z

    Type of the object on which the operation is applied

    F

    Downconverted type of Z, for details, see DownTransformConstraint

    T

    The element type of the resulting object

    V

    The type of the resulting object

    Since

    0.1

  25. trait LengthConstraint[HL, L <: Dense] extends AnyRef

    Permalink

    Marker trait for typelevel length.

    Marker trait for typelevel length.

    Author:

    Harshad Deo

    HL

    Type of the object for which the length is being computed

    L

    Length

    Since

    0.1

  26. trait ListBuilderConstraint[T, LB] extends AnyRef

    Permalink

    Typeclass to convert an object to a list.

    Typeclass to convert an object to a list. Differs from ToListConstraint in that in practice, the lower bound will be constrained by another typeclass. To implicitly obtain a typeclass with the LB constrained, see ToListConstraint.

    Author:

    Harshad Deo

    T

    Type of the object being converted

    LB

    Element type of the resulting list

    Since

    0.1

  27. trait LubConstraint[I, R] extends AnyRef

    Permalink

    Marker trait for the Lease Uppper Bound Type for all elements of an object.

    Marker trait for the Lease Uppper Bound Type for all elements of an object.

    Author:

    Harshad Deo

    I

    Type of the object

    R

    Lease Upper Bound

    Since

    0.1

  28. trait RemoveConstraint[N, HL, R] extends AnyRef

    Permalink

    Typeclass to remove an element at a specified type-index.

    Typeclass to remove an element at a specified type-index. By convention, indices are 0-based from the left (beginning).

    Author:

    Harshad Deo

    N

    Index at which the element is to be inserted

    HL

    Type of the object in which the insertion is taking place

    R

    Type of the result

    Since

    0.1

  29. trait RemoveRightConstraint[N, HL, R] extends AnyRef

    Permalink

    Typeclass to remove an element at a specified type-index.

    Typeclass to remove an element at a specified type-index. By convention, indices are 0-based from the right (end).

    Author:

    Harshad Deo

    N

    Index at which the element is to be inserted

    HL

    Type of the object in which the insertion is taking place

    R

    Type of the result

    Since

    0.1

  30. trait ReverseConstraint[A, R] extends AnyRef

    Permalink

    Typeclass to reverse a sequentially indexed object, like a HList or a tuple.

    Typeclass to reverse a sequentially indexed object, like a HList or a tuple.

    Author:

    Harshad Deo

    A

    Type of the object being reversed

    R

    Type of the reversed object

    Since

    0.1

  31. trait SIAddConstraint[N, S, U, R] extends AnyRef

    Permalink

    Typeclass to add an element at a string indexed collection, like a StringIndexedCollection or a Record.

    Typeclass to add an element at a string indexed collection, like a StringIndexedCollection or a Record.

    Author:

    Harshad Deo

    N

    Index at which to add (ValueHash of the key)

    S

    Type of original collection

    U

    Type of the object being added

    R

    Type of the resultant collection

    Since

    0.1

  32. trait SplitAtConstraint[N, HL, L, R] extends AnyRef

    Permalink

    Typeclass to split a sequentially indexed collection (like a HList or a tuple) at a specified index.

    Typeclass to split a sequentially indexed collection (like a HList or a tuple) at a specified index. By Convention, indices are 0-based and begin from the left (beginning).

    Author:

    Harshad Deo

    N

    Index at which to split

    HL

    Type of the object to split

    L

    Type of the first object obtained by splitting

    R

    Type of the second object obtained by splitting

    Since

    0.1

  33. trait SplitAtRightConstraint[N, HL, L, R] extends AnyRef

    Permalink

    Typeclass to split a sequentially indexed collection (like a HList or a tuple) at a specified index.

    Typeclass to split a sequentially indexed collection (like a HList or a tuple) at a specified index. By Convention, indices are 0-based and begin from the right (end).

    Author:

    Harshad Deo

    N

    Index at which to split

    HL

    Type of the object to split

    L

    Type of the first object obtained by splitting

    R

    Type of the second object obtained by splitting

    Since

    0.1

  34. trait TakeConstraint[N, HL, R] extends AnyRef

    Permalink

    Typeclass to take a type-indexed number of elements from the left of a sequentially indexed object, like a HList or a tuple.

    Typeclass to take a type-indexed number of elements from the left of a sequentially indexed object, like a HList or a tuple. By convention, indexes are 0-based.

    Author:

    Harshad Deo

    N

    Type index of the elements to be dropped

    HL

    Type of the object from which the elements are to be dropped

    R

    Type of the result

    Since

    0.1

  35. trait TakeRightConstraint[N, HL, R] extends AnyRef

    Permalink

    Typeclass to take a type-indexed number of elements from the right of a sequentially indexed object, like a HList or a tuple.

    Typeclass to take a type-indexed number of elements from the right of a sequentially indexed object, like a HList or a tuple. By convention, indexes are 0-based.

    Author:

    Harshad Deo

    N

    Type index of the elements to be dropped

    HL

    Type of the object from which the elements are to be dropped

    R

    Type of the result

    Since

    0.1

  36. trait ToListConstraint[T, +R] extends AnyRef

    Permalink

    Typeclass to convert an object into a list, default implementation is provided in the companion object.

    Typeclass to convert an object into a list, default implementation is provided in the companion object. Differs from ListBuilderConstraint in that this is typically not built using structural induction, rather uses LubConstraint to fix a lower bound and a ListBuilderConstraint to do the conversion given the lower bound.

    Author:

    Harshad Deo

    T

    Type of the object being constructed

    R

    Element type of resultant list

    Since

    0.1

  37. trait ToMapConstraint[S, +R] extends AnyRef

    Permalink

    Typeclass to convert an object, such as a Record or a StringIndexedCollection to a map.

    Typeclass to convert an object, such as a Record or a StringIndexedCollection to a map.

    Author:

    Harshad Deo

    S

    Type of the object being converted

    R

    Type of the resultant map

    Since

    0.1

  38. trait TransformConstraint[-INP, +OP, +M[_], -N[_]] extends AnyRef

    Permalink

    Typeclass to apply a natural transformation to an object.

    Typeclass to apply a natural transformation to an object.

    Author:

    Harshad Deo

    INP

    Type of the input

    OP

    Type of the output

    M

    Input of the transformation

    N

    Output of the transformation

    Since

    0.1

  39. final class TrueConstraint[T] extends AnyRef

    Permalink
  40. trait TrueConstraintLowPriority extends AnyRef

    Permalink
  41. trait UpdatedConstraint[N, HL, A, R] extends AnyRef

    Permalink

    Typeclass to update an element at a given type index.

    Typeclass to update an element at a given type index. By convention, indices are 0-based and begin at the left.

    Author:

    Harshad Deo

    N

    Type index at which to update

    HL

    Type of the object to update

    A

    Type of the new object at the position

    R

    Type of the resultant object

    Since

    0.1

  42. trait UpdatedRightConstraint[N, HL, A, R] extends AnyRef

    Permalink

    Typeclass to update an element at a given type index.

    Typeclass to update an element at a given type index. By convention, indices are 0-based and begin at the right.

    Author:

    Harshad Deo

    N

    Type index at which to update

    HL

    Type of the object to update

    A

    Type of the new object at the position

    R

    Type of the resultant object

    Since

    0.1

Value Members

  1. object CountConstraint

    Permalink

    Companion object for the CountConstraint trait.

    Companion object for the CountConstraint trait. Contains a default implementation based on the ForeachConstraint

    Author:

    Harshad Deo

    Since

    0.1

  2. object ExistsConstraint

    Permalink

    Companion object for ExistsConstraint.

    Companion object for ExistsConstraint. Contains a default implementation based on the ForeachConstraint

    Author:

    Harshad Deo

    Since

    0.1

  3. object FoldLeftConstraint

    Permalink

    Companion object for the FoldLeftConstraint trait.

    Companion object for the FoldLeftConstraint trait. Contains a default implementation based on the ForeachConstraint

    Author:

    Harshad Deo

    Since

    0.1

  4. object ForallConstraint

    Permalink

    Companion object for the ForallConstraint trait.

    Companion object for the ForallConstraint trait. Contains a default implementation based on the ForeachConstraint

    Author:

    Harshad Deo

    Since

    0.1

  5. object ToListConstraint

    Permalink

    Companion object for ToListConstraint.

    Companion object for ToListConstraint. Contains default implementation in terms of LubConstraint and ListBuilderConstraint.

    Author:

    Harshad Deo

    Since

    0.1

  6. object TrueConstraint extends TrueConstraintLowPriority

    Permalink

Ungrouped