Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Supports DSL #27

Open
vitaliihonta opened this issue Jan 30, 2019 · 1 comment
Open

Supports DSL #27

vitaliihonta opened this issue Jan 30, 2019 · 1 comment
Assignees
Labels

Comments

@vitaliihonta
Copy link
Collaborator

I've recently added the following type alias into kernel:

type Supports[E <: Environment, Op[_[_]]] = Op[E#Repr]

Currently it allows to abstract over environment you are using:

def foo[F[_], A, E <: Environment](foo: Foo)(
  implicit canCombineByKey: E Supports CanCombineByKey,
  canReduce: E Supports CanReduce,
  hasSize: E Supports HasSize
  ...
) = ???

Need to provide an easier way to do so. For instance something like:

type RequiredAPI[E <: Environment] = 
  Supports[E, 
    CanCombineByKey & 
    CanReduce & 
    HasSize & ...
]
def foo[F[_], A, E <: Environment: RequiredAPI](foo: Foo) = ???
@vitaliihonta
Copy link
Collaborator Author

I tried different cases and it seems to be impossible...

@vitaliihonta vitaliihonta added help wanted Extra attention is needed research labels Jan 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant