-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
[#26] Ability to disable and enable colouring #38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no place for me here... I will choose the truth I like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this is some kind of magic 🧙🏼♂️
I really like how simple the functions still look!
I agree, that we should move in into a separate module.
Also, regarding the docs, I think that it would be helpful to have:
- Migration guides (even if you don't need to change anything, I still think it should be added explicitly)
- Explanation on how implicit params work, what does
?
mean there and some links to the docs would be awesome - Also updated README and
.cabal
file description with the note about this feature and probably example?
Generally, that is a really fantastic feature, and you come up with am awesome solution 👏🏼 ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work! 👏🏼 🏆
Resolves #26
Implemented using Implicit parameters. Verified in GHCi that it works!
Ideally, all existing code that uses
colourista
can simply upgrade to the latest version and it should work without any changes. If users want to support disabling and enabling of colouring, they need to add explicitHasColourMode
constraint. Currently, we have a magic instance that automatically sets colour mode toEnableColour
. But in the future, we can remove it, once users migrate to this new version, so we can have compile-time guarantees on making sure this constraint is enabled.Open questions (and possible TODOs):
ColourMode
into a separate module likeColourista.Mode
?