hasmin icon indicating copy to clipboard operation
hasmin copied to clipboard

Update to Haskell Stack LTS 22.5.

Open chungyc opened this issue 2 years ago • 1 comments

This pull request updates the Stack resolver to lts-22.5 and widens version bounds appropriately. It also switches the use of == with === to show which values are different. This was supported in QuickCheck 2.8, so the lower version bound for QuickCheck should still hold. No other code was modified, so the lower version bounds for other packages should still hold as well.

Ironically, the master branch does not build with current versions of Stack, or at least it caused a GHC panic on my machine.

This pull request is not quite ready because tests fail. Not knowing what could be causing the differences, I can't proceed further for now. (The test failures were the reason for the switch from == to ===, although it didn't help much so far.)

Test failure example

Failures:

  tests/Hasmin/Types/BasicShapeSpec.hs:19:38: 
  1) Hasmin.Types.BasicShape, <basic-shape> tests, Minified <basic-shape> maintains semantical equivalence
       Falsified (after 12 tests):
         Inset (Right (Length (Number {getRational = (-45) % 8}) REM) :| [Left (Percentage ((-18) % 5))]) (Just (BorderRadius (Left (Percentage (0 % 1)) :| [Right (Length (Number {getRational = 0 % 1}) REM),Left (Percentage ((-23) % 8)),Left (Percentage (22 % 7)),Left (Percentage ((-6) % 7)),Left (Percentage (23 % 6)),Right (Length (Number {getRational = (-29) % 7}) Q),Left (Percentage ((-45) % 8))]) [Left (Percentage ((-7) % 1)),Left (Percentage ((-27) % 7)),Left (Percentage ((-4) % 1)),Left (Percentage ((-49) % 5)),Right (Length (Number {getRational = 19 % 6}) Q),Right (Length (Number {getRational = 11 % 4}) EM),Left (Percentage ((-3) % 1))]))
         Inset (Right (Length (Number {getRational = (-45) % 8}) REM) :| [Left (Percentage ((-18) % 5))]) (Just (BorderRadius (Right NullLength :| [Right NullLength,Left (Percentage ((-23) % 8)),Left (Percentage (22 % 7)),Left (Percentage ((-6) % 7)),Left (Percentage (23 % 6)),Right (Length (Number {getRational = (-29) % 7}) Q),Left (Percentage ((-45) % 8))]) [Left (Percentage ((-7) % 1)),Left (Percentage ((-27) % 7)),Left (Percentage ((-4) % 1)),Left (Percentage ((-49) % 5)),Right (Length (Number {getRational = 19 % 24}) MM),Right (Length (Number {getRational = 11 % 4}) EM),Left (Percentage ((-3) % 1))])) /= Inset (Right (Length (Number {getRational = (-45) % 8}) REM) :| [Left (Percentage ((-18) % 5))]) (Just (BorderRadius (Left (Percentage (0 % 1)) :| [Right (Length (Number {getRational = 0 % 1}) REM),Left (Percentage ((-23) % 8)),Left (Percentage (22 % 7)),Left (Percentage ((-6) % 7)),Left (Percentage (23 % 6)),Right (Length (Number {getRational = (-29) % 7}) Q),Left (Percentage ((-45) % 8))]) [Left (Percentage ((-7) % 1)),Left (Percentage ((-27) % 7)),Left (Percentage ((-4) % 1)),Left (Percentage ((-49) % 5)),Right (Length (Number {getRational = 19 % 6}) Q),Right (Length (Number {getRational = 11 % 4}) EM),Left (Percentage ((-3) % 1))]))

  To rerun use: --match "/Hasmin.Types.BasicShape/<basic-shape> tests/Minified <basic-shape> maintains semantical equivalence/" --seed 137842799

  tests/Hasmin/Types/PositionSpec.hs:17:41: 
  2) Hasmin.Types.Position, <position> minification, Minified <position> maintains semantical equivalence
       Falsified (after 89500 tests):
         Position {origin1 = Nothing, offset1 = Just (Left (Percentage (50 % 1))), origin2 = Just PosBottom, offset2 = Nothing}
         Position {origin1 = Nothing, offset1 = Just (Left (Percentage (50 % 1))), origin2 = Nothing, offset2 = Just (Left (Percentage (100 % 1)))} /= Position {origin1 = Nothing, offset1 = Just (Left (Percentage (50 % 1))), origin2 = Just PosBottom, offset2 = Nothing}

  To rerun use: --match "/Hasmin.Types.Position/<position> minification/Minified <position> maintains semantical equivalence/" --seed 137842799

Randomized with seed 137842799

chungyc avatar Jan 13 '24 03:01 chungyc

Just saw this. Thanks for taking the time! Unfortunately I've been away of Haskell for some years already and have too much going on currently to dig deeper into this. I'll try to find the time to update this things, and use this PR as starting point if possible. I can't promise anything though, but I might have some time in the following weeks. Once again thanks and sorry I can't be more active with this.

contivero avatar Mar 14 '24 12:03 contivero