sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
360 stars 73 forks source link

`separate` function (related to `visibility`) should be removed #225

Open nsaunders opened 2 years ago

nsaunders commented 2 years ago

The separate function declared here should be removed.

image
ddssff commented 2 years ago

Added here: https://github.com/sebastiaanvisser/clay/commit/4221200c53599f81d8f86c99f3b7c5c9fe4556f3

turion commented 2 years ago

Ah, so it seems the type signature borderCollapse :: Visibility -> Css is actually wrong? There is a comment here https://github.com/sebastiaanvisser/clay/commit/4221200c53599f81d8f86c99f3b7c5c9fe4556f3#diff-a82ec625bccfadbae37e6579b4a63ecadcd99a3090a43478674483df463b4a24R160-R170 describing a cleaner but lengthier alternative. I'd prefer that alternative as well, but it will trigger a major version bump.

nsaunders commented 2 years ago

Good find @turion. As you know, naming conflicts have been resolved with "namespacing" before, so that would certainly be an option. On the other hand, could this be resolved with, say, a Collapse type class (similar to global keywords)? If so, I suppose it would still technically break compatibility, but (if I'm thinking about it correctly) existing code should still compile... What do you think?

github-actions[bot] commented 1 month ago

This issue has not seen any activity in a long time. If no further activity occurs, it will be closed after ten weeks.

turion commented 1 month ago

I think a Collapse type class is worth a shot.