Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Record wrapper with Monoid and Eq instances #6

Closed
paluh opened this issue Mar 20, 2018 · 3 comments
Closed

Record wrapper with Monoid and Eq instances #6

paluh opened this issue Mar 20, 2018 · 3 comments

Comments

@paluh
Copy link

paluh commented Mar 20, 2018

@justinwoo Are you interested in this kind of wrapper around record: https://gist.github.com/paluh/fd49a4e0f1065967783f23911a0b4466#file-extra-purs-L102 ?

@AdamSaleh
Copy link
Contributor

@paluh, I think the code you have here is almost the same thing I have in the open PR #5, AFAIK it is 80% your code anyway :) My version is missing the newtypws though, so I am wondering, how would they help? I kinda assumed I would have to define new Newtype for every new row, to avoid overlapping instances. Did I miss something?

@paluh
Copy link
Author

paluh commented May 7, 2018

@AdamSaleh You are right - implementation of appendRecord or eqRecord is not really a subject of this proposition.
I'm asking whether we want to provide a newtype Record' wrapper so I can wrap regular record in it (Record' {...}) and pass into a function which has for example Semigroup constraint on given input type.

@justinwoo
Copy link
Owner

Closing to clean up my feed

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

No branches or pull requests

3 participants