Skip to content

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

Description

@hdgarrood

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions