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

Update to Haskell Stack LTS 22.5. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions hasmin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ executable hasmin
, gitrev >=1.0.0 && <1.4
, hasmin
, hopfli >=0.2 && <0.4
, optparse-applicative >=0.11 && <0.17
, text >=1.2 && <1.3
, optparse-applicative >=0.11 && <0.19
, text >=1.2 && <2.1

other-modules: Paths_hasmin

Expand All @@ -65,10 +65,10 @@ library
, base >=4.10 && <5.0
, containers >=0.5 && <0.7
, matrix >=0.3.4 && <0.4
, mtl >=2.2.1 && <2.3
, mtl >=2.2.1 && <2.4
, numbers >=3000.2.0.0 && <3000.3
, parsers >=0.12.3 && <0.13
, text >=1.2 && <1.3
, text >=1.2 && <2.1

-- 'Hasmin.Parser.BasicShape' is exposed because it is needed by tests:
exposed-modules:
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-13.0
resolver: lts-22.5
packages:
- '.'
extra-deps:
Expand Down
4 changes: 2 additions & 2 deletions tests/Hasmin/TestUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ minifyWithTestConfig x = runReader (minify x) cfg
where cfg = defaultConfig { dimensionSettings = DimMinOn }

-- | Check that a color is equivalent to their minified representation form
prop_minificationEq :: (Minifiable a, Eq a) => a -> Bool
prop_minificationEq d = minifyWithTestConfig d == d
prop_minificationEq :: (Minifiable a, Eq a, Show a) => a -> Property
prop_minificationEq d = minifyWithTestConfig d === d

-- Given a parser and a 3-tuple, prints a test description,
-- applies the parser, and compares its result with the expected result
Expand Down
2 changes: 1 addition & 1 deletion tests/Hasmin/Types/BasicShapeSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ basicShapeTests =
describe "<basic-shape> tests" $ do
traverse_ (matchSpec f) basicShapeTestsInfo
modifyMaxSuccess (const 10000) . it "Minified <basic-shape> maintains semantical equivalence" $
property (prop_minificationEq :: BasicShape -> Bool)
property (prop_minificationEq :: BasicShape -> Property)
where f :: Parser Value
f = minifyWithTestConfig <$> value

Expand Down
2 changes: 1 addition & 1 deletion tests/Hasmin/Types/BgSizeSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ quickcheckBgSize :: Spec
quickcheckBgSize =
describe "Quickcheck tests for <bg-size>" .
it "Minified <bg-size> maintains semantical equivalence" $
property (prop_minificationEq :: BgSize -> Bool)
property (prop_minificationEq :: BgSize -> Property)

bgSizeTests :: Spec
bgSizeTests =
Expand Down
2 changes: 1 addition & 1 deletion tests/Hasmin/Types/ColorSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ colorTests :: Spec
colorTests =
describe "<color> tests" .
it "minified color is semantically equivalent" $
property (prop_minificationEq :: Color -> Bool)
property (prop_minificationEq :: Color -> Property)

colorParserTests :: Spec
colorParserTests =
Expand Down
10 changes: 5 additions & 5 deletions tests/Hasmin/Types/DimensionSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ dimensionTests :: Spec
dimensionTests =
describe "Dimension tests with quickcheck" $ do
it "Minified <length>s are equivalent to the original ones" $
property (prop_minificationEq :: Length -> Bool)
property (prop_minificationEq :: Length -> Property)
it "Minified <angle>s are equivalent to the original ones" $
property (prop_minificationEq :: Angle -> Bool)
property (prop_minificationEq :: Angle -> Property)
it "Minified <time>s are equivalent to the original ones" $
property (prop_minificationEq :: Time -> Bool)
property (prop_minificationEq :: Time -> Property)
it "Minified <frequency>s are equivalent to the original ones" $
property (prop_minificationEq :: Frequency -> Bool)
property (prop_minificationEq :: Frequency -> Property)
it "Minified <resolution>s are equivalent to the original ones" $
property (prop_minificationEq :: Resolution -> Bool)
property (prop_minificationEq :: Resolution -> Property)

spec :: Spec
spec = do
Expand Down
2 changes: 1 addition & 1 deletion tests/Hasmin/Types/FilterFunctionSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ quickcheckFilter :: Spec
quickcheckFilter =
describe "Quickcheck <filter-function> tests" .
it "Minified <filter-function> maintains semantical equivalence" $
property (prop_minificationEq :: FilterFunction -> Bool)
property (prop_minificationEq :: FilterFunction -> Property)

filterTestsInfo :: [(String, Text, Text)]
filterTestsInfo =
Expand Down
2 changes: 1 addition & 1 deletion tests/Hasmin/Types/PositionSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ positionMinificationTests =
describe "<position> minification" $ do
mapM_ (matchSpec f) positionMinificationTestsInfo
modifyMaxSuccess (const 200000) . it "Minified <position> maintains semantical equivalence" $
property (prop_minificationEq :: Position -> Bool)
property (prop_minificationEq :: Position -> Property)
where f = minifyWithTestConfig <$> position

positionMinificationTestsInfo :: [(Text, Text)]
Expand Down
2 changes: 1 addition & 1 deletion tests/Hasmin/Types/RepeatStyleSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repeatStyleTests :: Spec
repeatStyleTests =
describe "<repeat-style> minification tests" $ do
it "Minified <repeat-style> maintains semantic equivalence" $
property (prop_minificationEq :: RepeatStyle -> Bool)
property (prop_minificationEq :: RepeatStyle -> Property)
mapM_ (matchSpec f) repeatStyleTestsInfo
where f = minifyWithTestConfig <$> repeatStyle

Expand Down
2 changes: 1 addition & 1 deletion tests/Hasmin/Types/TimingFunctionSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ quickcheckTimingFunction :: Spec
quickcheckTimingFunction =
describe "<timing-function> quickcheck tests" .
it "Minified <timing-function> maintains semantical equivalence" $
property (prop_minificationEq :: TimingFunction -> Bool)
property (prop_minificationEq :: TimingFunction -> Property)

timingFunctionTestsInfo :: [(Text, Text)]
timingFunctionTestsInfo =
Expand Down