Skip to content

Latest hackage failing to build with vector HEAD #38

Open

Description

@parsonsmatt

vector-algorithms fails to build with vector supporting GHC 9.4 because the API apparently changed in the Data.Vector.Internal.Check module.

Build log:

Configuring library for vector-algorithms-0.8.0.4..
Preprocessing library for vector-algorithms-0.8.0.4..
Building library for vector-algorithms-0.8.0.4..
[ 1 of 10] Compiling Data.Vector.Algorithms.Common ( src/Data/Vector/Algorithms/Common.hs, dist/build/Data/Vector/Algorithms/Common.o, dist/build/Data/Vector/Algorithms/Common.dyn_o )
[ 2 of 10] Compiling Data.Vector.Algorithms.Optimal ( src/Data/Vector/Algorithms/Optimal.hs, dist/build/Data/Vector/Algorithms/Optimal.o, dist/build/Data/Vector/Algorithms/Optimal.dyn_o )

src/Data/Vector/Algorithms/Optimal.hs:57:42: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 57)
            Ck.Unsafe)
           "sort2ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 57)
           Ck.Unsafe)
          "sort2ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
               Ck.Unsafe)
              "sort2ByIndex" j (length a)
              $ do a0 <- unsafeRead a i
                   a1 <- unsafeRead a j
                   case cmp a0 a1 of
                     GT -> unsafeWrite a i a1 >> unsafeWrite a j a0
                     _ -> return ()
   |
57 | sort2ByIndex cmp a i j = UNSAFE_CHECK(checkIndex) "sort2ByIndex" i (length a)
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:57:86: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 57)
            Ck.Unsafe)
           "sort2ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 57)
           Ck.Unsafe)
          "sort2ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
               Ck.Unsafe)
              "sort2ByIndex" j (length a)
              $ do a0 <- unsafeRead a i
                   a1 <- unsafeRead a j
                   case cmp a0 a1 of
                     GT -> unsafeWrite a i a1 >> unsafeWrite a j a0
                     _ -> return ()
   |
57 | sort2ByIndex cmp a i j = UNSAFE_CHECK(checkIndex) "sort2ByIndex" i (length a)
   |                                                                                      ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:57:97: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> a5 -> m ()
      Expected: Int -> Int -> a5 -> m ()
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort2ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 57)
            Ck.Unsafe)
           "sort2ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 57)
           Ck.Unsafe)
          "sort2ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
               Ck.Unsafe)
              "sort2ByIndex" j (length a)
              $ do a0 <- unsafeRead a i
                   a1 <- unsafeRead a j
                   case cmp a0 a1 of
                     GT -> unsafeWrite a i a1 >> unsafeWrite a j a0
                     _ -> return ()
    • Relevant bindings include
        a :: v (PrimState m) e
          (bound at src/Data/Vector/Algorithms/Optimal.hs:57:18)
        sort2ByIndex :: Comparison e
                        -> v (PrimState m) e -> Int -> Int -> m ()
          (bound at src/Data/Vector/Algorithms/Optimal.hs:57:1)
   |
57 | sort2ByIndex cmp a i j = UNSAFE_CHECK(checkIndex) "sort2ByIndex" i (length a)
   |                                                                                                 ^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:58:42: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
            Ck.Unsafe)
           "sort2ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
            Ck.Unsafe)
           "sort2ByIndex" j (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                case cmp a0 a1 of
                  GT -> unsafeWrite a i a1 >> unsafeWrite a j a0
                  _ -> return ()’
   |
58 |                        $ UNSAFE_CHECK(checkIndex) "sort2ByIndex" j (length a) $  do
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:58:86: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
            Ck.Unsafe)
           "sort2ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
            Ck.Unsafe)
           "sort2ByIndex" j (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                case cmp a0 a1 of
                  GT -> unsafeWrite a i a1 >> unsafeWrite a j a0
                  _ -> return ()’
   |
58 |                        $ UNSAFE_CHECK(checkIndex) "sort2ByIndex" j (length a) $  do
   |                                                                                      ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:58:97: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> m2 () -> a5
      Expected: Int -> Int -> m2 () -> a5
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort2ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
            Ck.Unsafe)
           "sort2ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 58)
            Ck.Unsafe)
           "sort2ByIndex" j (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                case cmp a0 a1 of
                  GT -> unsafeWrite a i a1 >> unsafeWrite a j a0
                  _ -> return ()’
   |
58 |                        $ UNSAFE_CHECK(checkIndex) "sort2ByIndex" j (length a) $  do
   |                                                                                                 ^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:78:44: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 78)
            Ck.Unsafe)
           "sort3ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 78)
           Ck.Unsafe)
          "sort3ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
               Ck.Unsafe)
              "sort3ByIndex" j (length a)
              $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
                   Ck.Unsafe)
                  "sort3ByIndex" k (length a)
                  $ do a0 <- unsafeRead a i
                       a1 <- unsafeRead a j
                       a2 <- unsafeRead a k
                       case cmp a0 a1 of
                         GT
                           -> case cmp a0 a2 of
                                GT -> ...
                                _ -> ...
                         _ -> case cmp a1 a2 of
                                GT -> ...
                                _ -> ...
   |
78 | sort3ByIndex cmp a i j k = UNSAFE_CHECK(checkIndex) "sort3ByIndex" i (length a)
   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:78:88: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 78)
            Ck.Unsafe)
           "sort3ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 78)
           Ck.Unsafe)
          "sort3ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
               Ck.Unsafe)
              "sort3ByIndex" j (length a)
              $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
                   Ck.Unsafe)
                  "sort3ByIndex" k (length a)
                  $ do a0 <- unsafeRead a i
                       a1 <- unsafeRead a j
                       a2 <- unsafeRead a k
                       case cmp a0 a1 of
                         GT
                           -> case cmp a0 a2 of
                                GT -> ...
                                _ -> ...
                         _ -> case cmp a1 a2 of
                                GT -> ...
                                _ -> ...
   |
78 | sort3ByIndex cmp a i j k = UNSAFE_CHECK(checkIndex) "sort3ByIndex" i (length a)
   |                                                                                        ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:78:99: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> a3 -> m ()
      Expected: Int -> Int -> a3 -> m ()
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort3ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 78)
            Ck.Unsafe)
           "sort3ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 78)
           Ck.Unsafe)
          "sort3ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
               Ck.Unsafe)
              "sort3ByIndex" j (length a)
              $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
                   Ck.Unsafe)
                  "sort3ByIndex" k (length a)
                  $ do a0 <- unsafeRead a i
                       a1 <- unsafeRead a j
                       a2 <- unsafeRead a k
                       case cmp a0 a1 of
                         GT
                           -> case cmp a0 a2 of
                                GT -> ...
                                _ -> ...
                         _ -> case cmp a1 a2 of
                                GT -> ...
                                _ -> ...
    • Relevant bindings include
        a :: v (PrimState m) e
          (bound at src/Data/Vector/Algorithms/Optimal.hs:78:18)
        sort3ByIndex :: Comparison e
                        -> v (PrimState m) e -> Int -> Int -> Int -> m ()
          (bound at src/Data/Vector/Algorithms/Optimal.hs:78:1)
   |
78 | sort3ByIndex cmp a i j k = UNSAFE_CHECK(checkIndex) "sort3ByIndex" i (length a)
   |                                                                                                   ^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:79:44: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
            Ck.Unsafe)
           "sort3ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
            Ck.Unsafe)
           "sort3ByIndex" j (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
                Ck.Unsafe)
               "sort3ByIndex" k (length a)
               $ do a0 <- unsafeRead a i
                    a1 <- unsafeRead a j
                    a2 <- unsafeRead a k
                    case cmp a0 a1 of
                      GT
                        -> case cmp a0 a2 of
                             GT -> ...
                             _ -> ...
                      _ -> case cmp a1 a2 of
                             GT -> ...
                             _ -> ...’
   |
79 |                          $ UNSAFE_CHECK(checkIndex) "sort3ByIndex" j (length a)
   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:79:88: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
            Ck.Unsafe)
           "sort3ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
            Ck.Unsafe)
           "sort3ByIndex" j (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
                Ck.Unsafe)
               "sort3ByIndex" k (length a)
               $ do a0 <- unsafeRead a i
                    a1 <- unsafeRead a j
                    a2 <- unsafeRead a k
                    case cmp a0 a1 of
                      GT
                        -> case cmp a0 a2 of
                             GT -> ...
                             _ -> ...
                      _ -> case cmp a1 a2 of
                             GT -> ...
                             _ -> ...’
   |
79 |                          $ UNSAFE_CHECK(checkIndex) "sort3ByIndex" j (length a)
   |                                                                                        ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:79:99: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> a4 -> a3
      Expected: Int -> Int -> a4 -> a3
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort3ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
            Ck.Unsafe)
           "sort3ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 79)
            Ck.Unsafe)
           "sort3ByIndex" j (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
                Ck.Unsafe)
               "sort3ByIndex" k (length a)
               $ do a0 <- unsafeRead a i
                    a1 <- unsafeRead a j
                    a2 <- unsafeRead a k
                    case cmp a0 a1 of
                      GT
                        -> case cmp a0 a2 of
                             GT -> ...
                             _ -> ...
                      _ -> case cmp a1 a2 of
                             GT -> ...
                             _ -> ...’
   |
79 |                          $ UNSAFE_CHECK(checkIndex) "sort3ByIndex" j (length a)
   |                                                                                                   ^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:80:44: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
            Ck.Unsafe)
           "sort3ByIndex" k (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
            Ck.Unsafe)
           "sort3ByIndex" k (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                a2 <- unsafeRead a k
                case cmp a0 a1 of
                  GT
                    -> case cmp a0 a2 of
                         GT -> ...
                         _ -> ...
                  _ -> case cmp a1 a2 of
                         GT -> ...
                         _ -> ...’
   |
80 |                          $ UNSAFE_CHECK(checkIndex) "sort3ByIndex" k (length a) $ do
   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:80:88: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
            Ck.Unsafe)
           "sort3ByIndex" k (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
            Ck.Unsafe)
           "sort3ByIndex" k (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                a2 <- unsafeRead a k
                case cmp a0 a1 of
                  GT
                    -> case cmp a0 a2 of
                         GT -> ...
                         _ -> ...
                  _ -> case cmp a1 a2 of
                         GT -> ...
                         _ -> ...’
   |
80 |                          $ UNSAFE_CHECK(checkIndex) "sort3ByIndex" k (length a) $ do
   |                                                                                        ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:80:99: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> m1 () -> a4
      Expected: Int -> Int -> m1 () -> a4
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort3ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
            Ck.Unsafe)
           "sort3ByIndex" k (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 80)
            Ck.Unsafe)
           "sort3ByIndex" k (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                a2 <- unsafeRead a k
                case cmp a0 a1 of
                  GT
                    -> case cmp a0 a2 of
                         GT -> ...
                         _ -> ...
                  _ -> case cmp a1 a2 of
                         GT -> ...
                         _ -> ...’
   |
80 |                          $ UNSAFE_CHECK(checkIndex) "sort3ByIndex" k (length a) $ do
   |                                                                                                   ^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:117:46: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 117)
            Ck.Unsafe)
           "sort4ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 117)
           Ck.Unsafe)
          "sort4ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
               Ck.Unsafe)
              "sort4ByIndex" j (length a)
              $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
                   Ck.Unsafe)
                  "sort4ByIndex" k (length a)
                  $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                       Ck.Unsafe)
                      "sort4ByIndex" l (length a)
                      $ do a0 <- unsafeRead a i
                           a1 <- unsafeRead a j
                           a2 <- unsafeRead a k
                           a3 <- unsafeRead a l
                           ....
    |
117 | sort4ByIndex cmp a i j k l = UNSAFE_CHECK(checkIndex) "sort4ByIndex" i (length a)
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:117:91: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 117)
            Ck.Unsafe)
           "sort4ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 117)
           Ck.Unsafe)
          "sort4ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
               Ck.Unsafe)
              "sort4ByIndex" j (length a)
              $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
                   Ck.Unsafe)
                  "sort4ByIndex" k (length a)
                  $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                       Ck.Unsafe)
                      "sort4ByIndex" l (length a)
                      $ do a0 <- unsafeRead a i
                           a1 <- unsafeRead a j
                           a2 <- unsafeRead a k
                           a3 <- unsafeRead a l
                           ....
    |
117 | sort4ByIndex cmp a i j k l = UNSAFE_CHECK(checkIndex) "sort4ByIndex" i (length a)
    |                                                                                           ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:117:102: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> a0 -> m ()
      Expected: Int -> Int -> a0 -> m ()
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort4ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 117)
            Ck.Unsafe)
           "sort4ByIndex" i (length a)’
      In the expression:
        ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 117)
           Ck.Unsafe)
          "sort4ByIndex" i (length a)
          $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
               Ck.Unsafe)
              "sort4ByIndex" j (length a)
              $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
                   Ck.Unsafe)
                  "sort4ByIndex" k (length a)
                  $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                       Ck.Unsafe)
                      "sort4ByIndex" l (length a)
                      $ do a0 <- unsafeRead a i
                           a1 <- unsafeRead a j
                           a2 <- unsafeRead a k
                           a3 <- unsafeRead a l
                           ....
    • Relevant bindings include
        a :: v (PrimState m) e
          (bound at src/Data/Vector/Algorithms/Optimal.hs:117:18)
        sort4ByIndex :: Comparison e
                        -> v (PrimState m) e -> Int -> Int -> Int -> Int -> m ()
          (bound at src/Data/Vector/Algorithms/Optimal.hs:117:1)
    |
117 | sort4ByIndex cmp a i j k l = UNSAFE_CHECK(checkIndex) "sort4ByIndex" i (length a)
    |                                                                                                      ^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:118:46: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
            Ck.Unsafe)
           "sort4ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
            Ck.Unsafe)
           "sort4ByIndex" j (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
                Ck.Unsafe)
               "sort4ByIndex" k (length a)
               $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                    Ck.Unsafe)
                   "sort4ByIndex" l (length a)
                   $ do a0 <- unsafeRead a i
                        a1 <- unsafeRead a j
                        a2 <- unsafeRead a k
                        a3 <- unsafeRead a l
                        ....’
    |
118 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" j (length a)
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:118:91: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
            Ck.Unsafe)
           "sort4ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
            Ck.Unsafe)
           "sort4ByIndex" j (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
                Ck.Unsafe)
               "sort4ByIndex" k (length a)
               $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                    Ck.Unsafe)
                   "sort4ByIndex" l (length a)
                   $ do a0 <- unsafeRead a i
                        a1 <- unsafeRead a j
                        a2 <- unsafeRead a k
                        a3 <- unsafeRead a l
                        ....’
    |
118 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" j (length a)
    |                                                                                           ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:118:102: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> a1 -> a0
      Expected: Int -> Int -> a1 -> a0
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort4ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
            Ck.Unsafe)
           "sort4ByIndex" j (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 118)
            Ck.Unsafe)
           "sort4ByIndex" j (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
                Ck.Unsafe)
               "sort4ByIndex" k (length a)
               $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                    Ck.Unsafe)
                   "sort4ByIndex" l (length a)
                   $ do a0 <- unsafeRead a i
                        a1 <- unsafeRead a j
                        a2 <- unsafeRead a k
                        a3 <- unsafeRead a l
                        ....’
    |
118 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" j (length a)
    |                                                                                                      ^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:119:46: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
            Ck.Unsafe)
           "sort4ByIndex" k (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
            Ck.Unsafe)
           "sort4ByIndex" k (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                Ck.Unsafe)
               "sort4ByIndex" l (length a)
               $ do a0 <- unsafeRead a i
                    a1 <- unsafeRead a j
                    a2 <- unsafeRead a k
                    a3 <- unsafeRead a l
                    ....’
    |
119 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" k (length a)
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:119:91: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
            Ck.Unsafe)
           "sort4ByIndex" k (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
            Ck.Unsafe)
           "sort4ByIndex" k (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                Ck.Unsafe)
               "sort4ByIndex" l (length a)
               $ do a0 <- unsafeRead a i
                    a1 <- unsafeRead a j
                    a2 <- unsafeRead a k
                    a3 <- unsafeRead a l
                    ....’
    |
119 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" k (length a)
    |                                                                                           ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:119:102: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> a2 -> a1
      Expected: Int -> Int -> a2 -> a1
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort4ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
            Ck.Unsafe)
           "sort4ByIndex" k (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 119)
            Ck.Unsafe)
           "sort4ByIndex" k (length a)
           $ ((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
                Ck.Unsafe)
               "sort4ByIndex" l (length a)
               $ do a0 <- unsafeRead a i
                    a1 <- unsafeRead a j
                    a2 <- unsafeRead a k
                    a3 <- unsafeRead a l
                    ....’
    |
119 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" k (length a)
    |                                                                                                      ^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:120:46: error:
    • Couldn't match type ‘[Char]’ with ‘Ck.Checks’
      Expected: Ck.Checks
        Actual: String
    • In the first argument of ‘Ck.checkIndex’, namely
        ‘"src/Data/Vector/Algorithms/Optimal.hs"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
            Ck.Unsafe)
           "sort4ByIndex" l (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
            Ck.Unsafe)
           "sort4ByIndex" l (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                a2 <- unsafeRead a k
                a3 <- unsafeRead a l
                ....’
    |
120 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" l (length a) $ do
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:120:91: error:
    • Couldn't match expected type ‘Int’ with actual type ‘Ck.Checks’
    • In the third argument of ‘Ck.checkIndex’, namely ‘Ck.Unsafe’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
            Ck.Unsafe)
           "sort4ByIndex" l (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
            Ck.Unsafe)
           "sort4ByIndex" l (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                a2 <- unsafeRead a k
                a3 <- unsafeRead a l
                ....’
    |
120 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" l (length a) $ do
    |                                                                                           ^^^^^^^^^

src/Data/Vector/Algorithms/Optimal.hs:120:102: error:
    • Couldn't match type: [Char]
                     with: Int -> Int -> m0 () -> a2
      Expected: Int -> Int -> m0 () -> a2
        Actual: String
    • In the fourth argument of ‘Ck.checkIndex’, namely
        ‘"sort4ByIndex"’
      In the first argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
            Ck.Unsafe)
           "sort4ByIndex" l (length a)’
      In the second argument of ‘($)’, namely
        ‘((Ck.checkIndex "src/Data/Vector/Algorithms/Optimal.hs" 120)
            Ck.Unsafe)
           "sort4ByIndex" l (length a)
           $ do a0 <- unsafeRead a i
                a1 <- unsafeRead a j
                a2 <- unsafeRead a k
                a3 <- unsafeRead a l
                ....’
    |
120 |                            $ UNSAFE_CHECK(checkIndex) "sort4ByIndex" l (length a) $ do
    |                                                                                                      ^^^^^^^^^^^^^^
cabal: Failed to build vector-algorithms-0.8.0.4 (which is required by
test:test from persistent-2.14.0.0). See the build log above for details.

Weirdly enough, it builds fine locally. Probably because the wrong build flags are passed.

Activity

  1. changed the title [-]Failing to build with `vector` HEAD[/-] [+]Latest hackage failing to build with `vector` HEAD[/+] on May 19, 2022
  2. parsonsmatt commented on May 19, 2022

    @parsonsmatt
    Author

    I think this can probably be fixed with a Hackage release.

  3. parsonsmatt commented on May 19, 2022

    @parsonsmatt
    Author

    Oh, shoot, I was definitely not testing what i thought I was testing. Build fails locally, too.

    Looks like this vector PR changed things from PrimMonad to ST concretely.

    λ ~/Projects/vector-algorithms/ matt/support-ghc-9.4* cabal test all -fproperties --allow-newer
    Build profile: -w ghc-9.4.0.20220501 -O1
    In order, the following will be built (use -v for more details):
     - vector-algorithms-0.8.0.4 (lib) (first run)
     - vector-algorithms-0.8.0.4 (test:properties) (configuration changed)
    Preprocessing library for vector-algorithms-0.8.0.4..
    Building library for vector-algorithms-0.8.0.4..
    [ 1 of 11] Compiling Data.Vector.Algorithms.Common ( src/Data/Vector/Algorithms/Common.hs, /home/matt/Projects/vector-algorithms/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220501/vector-algorithms-0.8.0.4/build
    /Data/Vector/Algorithms/Common.o, /home/matt/Projects/vector-algorithms/dist-newstyle/build/x86_64-linux/ghc-9.4.0.20220501/vector-algorithms-0.8.0.4/build/Data/Vector/Algorithms/Common.dyn_o )
    
    src/Data/Vector/Algorithms/Common.hs:130:34: error:
        • Couldn't match type ‘m’ with ‘GHC.ST.ST s0’
          Expected: m a
            Actual: GHC.ST.ST s0 a
          ‘m’ is a rigid type variable bound by
            the type signature for:
              copyToSmaller :: forall (v :: * -> * -> *) a (m :: * -> *).
                               (MVector v a, PrimMonad m) =>
                               v (PrimState m) a -> v (PrimState m) a -> m ()
            at src/Data/Vector/Algorithms/Common.hs:(121,1)-(123,51)
        • In a stmt of a 'do' block: x <- basicUnsafeRead src i
          In the expression:
            do x <- basicUnsafeRead src i
               basicUnsafeWrite dst i x
               do_copy (i + 1)
          In an equation for ‘do_copy’:
              do_copy i
                | i < n
                = do x <- basicUnsafeRead src i
                     basicUnsafeWrite dst i x
                     do_copy (i + 1)
                | otherwise = return ()
        • Relevant bindings include
            do_copy :: Int -> m ()
              (bound at src/Data/Vector/Algorithms/Common.hs:129:7)
            src :: v (PrimState m) a
              (bound at src/Data/Vector/Algorithms/Common.hs:124:21)
            dst :: v (PrimState m) a
              (bound at src/Data/Vector/Algorithms/Common.hs:124:16)
            copyToSmaller :: v (PrimState m) a -> v (PrimState m) a -> m ()
              (bound at src/Data/Vector/Algorithms/Common.hs:124:1)
        |
    130 |                             x <- basicUnsafeRead src i
        |                                  ^^^^^^^^^^^^^^^^^^^^^
    cabal: Failed to build vector-algorithms-0.8.0.4 (which is required by
    test:properties from vector-algorithms-0.8.0.4).
    

    This PR was landed in January 2021 so I'm a little stunned that it hasn't been released?

  4. Bodigrim commented on May 20, 2022

    @Bodigrim
    Contributor

    Yes, vector has been accumulating breaking changes in master branch for a long time. That's expected.

    As discussed elsewhere, I believe at this stage vector-algorithms does not need changes to be built against GHC 9.4 except version bumps.

  5. juhp commented on Jun 20, 2022

    @juhp

    I think a release is really needed now that vector-0.13 is out.

  6. hamishmack commented on Jun 20, 2022

    @hamishmack

    I think the upper bound for vector on vector-algorithms-0.8.0.4 in hackage needs to be revised from <0.14 down to <0.13. Currently cabal tries to build vector-algorithms-0.8.0.4 with the new vector-0.13 and fails.

  7. sjakobi commented on Jun 20, 2022

    @sjakobi

    As a Hackage trustee, I have revised v0.8.0.4 with a bound vector < 0.13: https://hackage.haskell.org/package/vector-algorithms-0.8.0.4/revisions/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions