Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional dependency between P[_] and A #36

Open
neutropolis opened this issue Dec 11, 2017 · 0 comments
Open

Functional dependency between P[_] and A #36

neutropolis opened this issue Dec 11, 2017 · 0 comments

Comments

@neutropolis
Copy link
Member

We define our entities in the data layer this way:

trait Entity[A] {
  type P[_]
}

We know that P[_] and A are related, since P is somehow hiding a value of type A. However this connection isn't reflected at all in the code. This notion seems like a functional dependency in Haskell, but we think that it should be enough if we define a MonadState[A, P] inside the trait. Consider this alternative and apply it, if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant