Skip to content

EventProp is a Functor - #168

Merged
armanbilge merged 6 commits into
mainfrom
pr/i167
Jan 27, 2023
Merged

EventProp is a Functor#168
armanbilge merged 6 commits into
mainfrom
pr/i167

Conversation

@armanbilge

Copy link
Copy Markdown
Owner

Closes #167.

I think this is a really interesting idea. I'm a bit worried if it makes EventProp a more confusing API, but I am not sure how user-facing it is anyway.

@armanbilge

armanbilge commented Jan 26, 2023

Copy link
Copy Markdown
Owner Author

Does this mean that Prop and HtmlAttr should implement Contravariant? Seems like it.

@hejfelix

Copy link
Copy Markdown

Yeah, I would say so, even if I don't have a use case for that yet.

private[calico] val key: String,
private[calico] val sink: Pipe[F, E, Nothing])

inline given [F[_], E]: (Functor[EventProp[F, E, _]] & FunctorFilter[EventProp[F, E, _]]) =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intersection type instance, exciting 😄

@armanbilge

Copy link
Copy Markdown
Owner Author

Yeah, I would say so, even if I don't have a use case for that yet.

@armanbilge

Copy link
Copy Markdown
Owner Author

Ok, I hope I don't regret this 😁

@armanbilge
armanbilge merged commit 03b64c2 into main Jan 27, 2023
@armanbilge
armanbilge deleted the pr/i167 branch January 27, 2023 07:20
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.

Implement Functor for EventProp

3 participants