packages feed

Color 0.3.0 → 0.3.1

raw patch · 5 files changed

+23/−9 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Graphics.Color.Space.RGB.Luma: instance forall k (cs :: Graphics.Color.Space.RGB.Internal.Linearity -> *) (i :: k) e. (Data.Typeable.Internal.Typeable cs, Graphics.Color.Space.Internal.Illuminant i, Graphics.Color.Space.Internal.ColorSpace (cs 'Graphics.Color.Space.RGB.Internal.Linear) i e, Graphics.Color.Space.Internal.ColorSpace (cs 'Graphics.Color.Space.RGB.Internal.NonLinear) i e, Graphics.Color.Space.RGB.Luma.Luma cs, Graphics.Color.Space.RGB.Internal.RedGreenBlue cs i, GHC.Float.RealFloat e) => Graphics.Color.Space.Internal.ColorSpace (Graphics.Color.Space.RGB.Luma.Y' cs) i e
+ Graphics.Color.Space.RGB.Luma: instance forall k (cs :: Graphics.Color.Space.RGB.Internal.Linearity -> *) (i :: k) e. (Data.Typeable.Internal.Typeable cs, Graphics.Color.Space.Internal.Illuminant i, Graphics.Color.Space.Internal.ColorSpace (cs 'Graphics.Color.Space.RGB.Internal.Linear) i e, Graphics.Color.Space.Internal.ColorSpace (cs 'Graphics.Color.Space.RGB.Internal.NonLinear) i e, Graphics.Color.Space.RGB.Luma.Luma cs, Graphics.Color.Space.RGB.Internal.RedGreenBlue cs i) => Graphics.Color.Space.Internal.ColorSpace (Graphics.Color.Space.RGB.Luma.Y' cs) i e

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for Color +## 0.3.1++* Remove `RealFloat` constraint from `ColorSpace` for `Y'`+ ## 0.3.0  * Rename `Y` color model into `X` to avoid the annoying name conflict.
Color.cabal view
@@ -1,5 +1,5 @@ name:                Color-version:             0.3.0+version:             0.3.1 synopsis:            Color spaces and conversions between them description:         Please see the README on GitHub at <https://github.com/lehins/Color#readme> homepage:            https://github.com/lehins/Color@@ -19,7 +19,8 @@                     , GHC == 8.6.3                     , GHC == 8.6.4                     , GHC == 8.6.5-                    , GHC == 8.8.3+                    , GHC == 8.8.4+                    , GHC == 8.10.4  library   hs-source-dirs:      src
README.md view
@@ -5,9 +5,9 @@  ## Status -| Language | Travis | Azure | Coveralls |Gitter.im |-|:--------:|:------:|:--------:|:---------:|:--------:|-| ![GitHub top language](https://img.shields.io/github/languages/top/lehins/Color.svg) | [![Travis](https://img.shields.io/travis/lehins/Color/master.svg?label=Linux%20%26%20OS%20X)](https://travis-ci.org/lehins/Color) | [![Build Status](https://dev.azure.com/kuleshevich/Color/_apis/build/status/lehins.Color?branchName=master)](https://dev.azure.com/kuleshevich/Color/_build?branchName=master) | [![Coverage Status](https://coveralls.io/repos/github/lehins/Color/badge.svg?branch=master)](https://coveralls.io/github/lehins/Color?branch=master) | [![Join the chat at https://gitter.im/haskell-massiv/Lobby](https://badges.gitter.im/haskell-massiv/Lobby.svg)](https://gitter.im/haskell-massiv/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)+| Language | Github Actions | Coveralls |Gitter.im |+|:--------:|:--------------:|:---------:|:--------:|+| ![GitHub top language](https://img.shields.io/github/languages/top/lehins/Color.svg) | [![Build Status](https://github.com/lehins/Color/workflows/Color-CI/badge.svg)](https://github.com/lehins/Color/actions) | [![Coverage Status](https://coveralls.io/repos/github/lehins/Color/badge.svg?branch=master)](https://coveralls.io/github/lehins/Color?branch=master) | [![Join the chat at https://gitter.im/haskell-massiv/Lobby](https://badges.gitter.im/haskell-massiv/Lobby.svg)](https://gitter.im/haskell-massiv/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)  |      Package       | Hackage | Nightly | LTS | |:-------------------|:-------:|:-------:|:---:|
src/Graphics/Color/Space/RGB/Luma.hs view
@@ -104,18 +104,17 @@          , ColorSpace (cs 'NonLinear) i e          , Luma cs          , RedGreenBlue cs i-         , RealFloat e          ) =>          ColorSpace (Y' cs) i e where   type BaseModel (Y' cs) = CM.X   type BaseSpace (Y' cs) = cs 'NonLinear   toBaseSpace y = pure (coerce y :: e)   {-# INLINE toBaseSpace #-}-  fromBaseSpace = rgbLuma+  fromBaseSpace = fmap fromDouble . rgbLuma   {-# INLINE fromBaseSpace #-}-  luminance = luminance . toBaseLinearSpace+  luminance = luminance . fmap (fromDouble :: Double -> e) . toBaseLinearSpace . fmap toDouble   {-# INLINE luminance #-}-  toColorXYZ = toColorXYZ . toBaseLinearSpace+  toColorXYZ = toColorXYZ . fmap (fromDouble :: Double -> e) . toBaseLinearSpace . fmap toDouble   {-# INLINE toColorXYZ #-}  -- | Convert Luma directly into the linear version of base space. This is equivalent to
tests/doctests.hs view
@@ -1,6 +1,16 @@+{-# LANGUAGE CPP #-} module Main where +#if __GLASGOW_HASKELL__ >= 802 && __GLASGOW_HASKELL__ < 810+ import Test.DocTest (doctest)  main :: IO () main = doctest ["src"]++#else++main :: IO ()+main = putStrLn "\nDoctests are not supported for older ghc version\n"++#endif