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

Refactor DisplayConfiguration to typeclass #8

Open
dogonthehorizon opened this issue Nov 28, 2019 · 0 comments
Open

Refactor DisplayConfiguration to typeclass #8

dogonthehorizon opened this issue Nov 28, 2019 · 0 comments
Labels
togglemon Tasks specific to togglemon

Comments

@dogonthehorizon
Copy link
Owner

Right now display configurations are contained in a sum type, but that doesn't provide an easy way to extend configurations down the road.

Better to have a typeclass that individual types implement.

Something like this perhaps:

class DisplayConfiguration a where
  getConfiguration :: [Display] -> Maybe a
  toXrandrCommand :: a -> Text
@dogonthehorizon dogonthehorizon added the togglemon Tasks specific to togglemon label Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
togglemon Tasks specific to togglemon
Projects
None yet
Development

No branches or pull requests

1 participant