-
Notifications
You must be signed in to change notification settings - Fork 38
Update all dependency versions. Use PSC 0.10. #43
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
Conversation
Thanks! Looks like the space is new, but it doesn't seem like a problem to me 😄 |
@garyb I discovered why that space was added. It appears this change in purescript-tuples did it: https://github.com/purescript/purescript-tuples/pull/23/files It adds a Unit to the end of a |
Ah right, the |
So, if I want to make Tuple an instance of a type class, I need to also make Unit an instance of my type class? It seems a bit weird. @garyb, if you think it's right, then I can accept it. I'm trying to think about how to write a special case to handle the last element of a nested tuple. Can we pattern-match to know we're at the end and can handle that special-case? There's no data constructor for Unit, so I believe we can't. I believe this is the difference between List and nested Tuple - List has |
Another way of looking at it, is the |
Oops, didn't see your message before I posted that ^. This is purely due to a use of a So no, the instances for |
That's a very helpful way of looking at it, thanks. I feel this CSS library should move away from Data.Tuple.Nested's "tupleN" functions. I'm looking at usages here and we're taking advantage of extensible tuples. Instead, should we manually create these Tuples to ensure they don't end in Unit? Or move away from Tuples and use List instead? |
I think creating them manually would be better than using a |
A bug appeared when running tests after upgrading - a
Tuple (String Unit)
will render with an extra space on the end. I don't know how to fix, and I don't know if this test failed before upgrade. Shouldn't hurt to keep this behavior, though.