Skip to content

fill in Multi-Param Type Classes#211

Closed
justinwoo wants to merge 1 commit into
purescript:masterfrom
justinwoo:multi-param-classes
Closed

fill in Multi-Param Type Classes#211
justinwoo wants to merge 1 commit into
purescript:masterfrom
justinwoo:multi-param-classes

Conversation

@justinwoo

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread language/Type-Classes.md Outdated
Comment thread language/Type-Classes.md
@hdgarrood

Copy link
Copy Markdown
Collaborator

We've resolved the issue in the purescript-either repo, but on second thoughts, I think this example is probably not best suited because of the use of instance chains, which I would consider to be something of a 'power user' feature. What about, say, MonadState instead?

@justinwoo

Copy link
Copy Markdown
Contributor Author

I was thinking of something simpler along the lines of IsTypeEqual

@hdgarrood

hdgarrood commented Dec 11, 2018

Copy link
Copy Markdown
Collaborator

Yeah, that's a good option, although another problem with both of these is that the functional dependencies could also risk obscuring what we're trying to get across. Are there even any good examples of MPTCs with no functional dependencies?

@natefaubion

natefaubion commented Dec 11, 2018

Copy link
Copy Markdown
Contributor

I think it would be good to use something like MonadAsk both with and without functional dependencies. While we don't have a version of MonadAsk without the constraints, it highlights the use case and tradeoffs.

@natefaubion

natefaubion commented Dec 11, 2018

Copy link
Copy Markdown
Contributor

MonadError is another good one. I think these are better than MonadState because the case of wanting to project different environments or throw different errors comes up more often for me than modifying multiple states.

@justinwoo

Copy link
Copy Markdown
Contributor Author

Cleaning up my github notifications

@justinwoo justinwoo closed this Jan 29, 2020
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

Successfully merging this pull request may close these issues.

5 participants