diff --git a/JuicyPixels-blurhash.cabal b/JuicyPixels-blurhash.cabal index e0e8395..8d1898f 100644 --- a/JuicyPixels-blurhash.cabal +++ b/JuicyPixels-blurhash.cabal @@ -48,10 +48,10 @@ library build-depends: JuicyPixels >=3.2.8 && <3.4 , base >=4.7 && <5 - , bytestring >=0.9 && <0.11 - , containers >=0.4.2 && <0.7 - , filepath >=1.4.1.1 && <1.5 - , vector >=0.10 && <0.13 + , bytestring >=0.11 + , containers >=0.4.2 && <=0.7 + , filepath >=1.4.1.1 && <=1.6 + , vector >=0.10 && <=0.14 default-language: Haskell2010 executable JuicyPixels-blurhash-exe @@ -65,11 +65,11 @@ executable JuicyPixels-blurhash-exe JuicyPixels >=3.2.8 && <3.4 , JuicyPixels-blurhash , base >=4.7 && <5 - , bytestring >=0.9 && <0.11 - , containers >=0.4.2 && <0.7 - , filepath >=1.4.1.1 && <1.5 + , bytestring >=0.11 + , containers >=0.4.2 && <=0.7 + , filepath >=1.4.1.1 && <=1.6 , optparse-applicative >=0.14.3 && <0.18 - , vector >=0.10 && <0.13 + , vector >=0.10 && <=0.14 default-language: Haskell2010 test-suite JuicyPixels-blurhash-doctests @@ -85,11 +85,11 @@ test-suite JuicyPixels-blurhash-doctests , JuicyPixels >=3.2.8 && <3.4 , JuicyPixels-blurhash , base >=4.7 && <5 - , bytestring >=0.9 && <0.11 - , containers >=0.4.2 && <0.7 - , doctest >=0.16.2 && <0.20 - , filepath >=1.4.1.1 && <1.5 - , vector >=0.10 && <0.13 + , bytestring >=0.11 + , containers >=0.4.2 && <=0.7 + , doctest >=0.22 + , filepath >=1.4.1.1 && <=1.6 + , vector >=0.10 && <=0.14 default-language: Haskell2010 test-suite JuicyPixels-blurhash-test @@ -102,14 +102,15 @@ test-suite JuicyPixels-blurhash-test JuicyPixels >=3.2.8 && <3.4 , JuicyPixels-blurhash , base >=4.7 && <5 - , bytestring >=0.9 && <0.11 - , containers >=0.4.2 && <0.7 - , filepath >=1.4.1.1 && <1.5 - , hedgehog >=1.0.2 && <1.2 + , bytestring >=0.11 + , containers >=0.4.2 && <=0.7 + , filepath >=1.4.1.1 && <=1.6 + , hedgehog >=1.4 , tasty >=1.2.3 && <1.5 - , tasty-discover >=4.2.1 && <4.3 - , tasty-hedgehog >=1.0.0.2 && <1.2 + , tasty-hedgehog >=1.4 , tasty-hunit >=0.10.0.2 && <0.11 - , vector >=0.10 && <0.13 + , vector >=0.10 && <=0.14 + build-tool-depends: + tasty-discover:tasty-discover >=4.2 && <4.3 default-language: Haskell2010 other-modules: Blurhash diff --git a/doctest/Main.hs b/doctest/Main.hs index cfccc9b..44f2ac4 100644 --- a/doctest/Main.hs +++ b/doctest/Main.hs @@ -4,4 +4,15 @@ import System.FilePath.Glob (glob) import Test.DocTest (doctest) main :: IO () -main = glob "src/**/*.hs" >>= doctest +main = do + sources <- glob "src/**/*.hs" + doctest $ + [ "-isrc" + , "-XTemplateHaskell" + , "-XCPP" + , "-package=JuicyPixels" + , "-package=bytestring" + , "-package=containers" + , "-package=vector" + , "-package=filepath" + ] ++ sources diff --git a/package.yaml b/package.yaml index 8536f5e..2506dfe 100644 --- a/package.yaml +++ b/package.yaml @@ -62,10 +62,10 @@ tests: - -with-rtsopts=-N dependencies: - JuicyPixels-blurhash - - hedgehog >= 1.0.2 && < 1.2 + - hedgehog >= 1.4 - tasty >= 1.2.3 && < 1.5 - tasty-discover >= 4.2.1 && < 4.3 - - tasty-hedgehog >= 1.0.0.2 && < 1.2 + - tasty-hedgehog >=1.4 - tasty-hunit >= 0.10.0.2 && < 0.11 JuicyPixels-blurhash-doctests: main: Main.hs diff --git a/src/Codec/Picture/Blurhash/Internal/Base83.hs b/src/Codec/Picture/Blurhash/Internal/Base83.hs index 2d2cb9a..ffc70e4 100644 --- a/src/Codec/Picture/Blurhash/Internal/Base83.hs +++ b/src/Codec/Picture/Blurhash/Internal/Base83.hs @@ -17,7 +17,7 @@ import Data.Foldable (foldlM) import Data.Word (Word8) import qualified Data.ByteString.Lazy as BS -import qualified Data.ByteString.Lazy.Builder as BS +import qualified Data.ByteString.Builder as BS import qualified Data.Map as Map import qualified Data.Vector as V diff --git a/src/Codec/Picture/Blurhash/Internal/DList.hs b/src/Codec/Picture/Blurhash/Internal/DList.hs index acd67f5..1148293 100644 --- a/src/Codec/Picture/Blurhash/Internal/DList.hs +++ b/src/Codec/Picture/Blurhash/Internal/DList.hs @@ -20,7 +20,7 @@ toDList l = \l' -> l ++ l' -- | Convert a difference list to a list dListToList :: DList a -> [a] -dListToList = ($[]) +dListToList = ($ []) -- | Append an item to the end of a difference list dListSnoc :: DList a -> a -> DList a diff --git a/src/Codec/Picture/Blurhash/Internal/Encode.hs b/src/Codec/Picture/Blurhash/Internal/Encode.hs index 4ac2fdb..e02df99 100644 --- a/src/Codec/Picture/Blurhash/Internal/Encode.hs +++ b/src/Codec/Picture/Blurhash/Internal/Encode.hs @@ -18,7 +18,7 @@ import Data.Foldable (foldl') import GHC.Generics (Generic) import qualified Data.ByteString.Lazy as BS -import qualified Data.ByteString.Lazy.Builder as BS +import qualified Data.ByteString.Builder as BS import Codec.Picture (DynamicImage, Image(..), PixelRGB8(..), PixelRGBF(..), convertRGB8, colorMap) import Codec.Picture.Types (pixelFold, ColorConvertible(..)) -- ColorConvertible imported for haddocks