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

Conversation

chungyc
Copy link

@chungyc chungyc commented Jan 13, 2024

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 chungyc marked this pull request as ready for review January 13, 2024 03:21
@contivero
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants