Skip to content
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

Newtype instance for ColorName defeats the purpose of hiding the constructor #71

Open
hdgarrood opened this issue Jun 27, 2019 · 0 comments

Comments

@hdgarrood
Copy link
Contributor

hdgarrood commented Jun 27, 2019

Providing a Newtype instance for ColorName means that you're able to wrap and unwrap ColorName values, even though the constructor is not exported:

import Data.Newtype
import Lumi.Components.Color

huh :: String
huh = unwrap colorNames.black

We should probably export the constructor, or remove the Newtype instance.

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

No branches or pull requests

1 participant