georgefst / lifx-lan

https://hackage.haskell.org/package/lifx-lan
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Use newtype for Kelvin? #11

Open georgefst opened 3 years ago

georgefst commented 3 years ago

Then we could give it a nice Bounded instance reflecting the actual range:

instance Bounded Kelvin where
    minBound = Kelvin 1500
    maxBound = Kelvin 9000
georgefst commented 3 years ago

We could include Num/Integral instances for convenience, but with a warning.