Zubin pushed to branch wip/9.14.2-backports at Glasgow Haskell Compiler / GHC

Commits:

7 changed files:

Changes:

  • testsuite/tests/codeGen/should_run/CgStaticPointers.hs
    ... ... @@ -15,9 +15,9 @@ main = do
    15 15
       print $ deRefStaticPtr (static g)
    
    16 16
       print $ deRefStaticPtr p0 'a'
    
    17 17
       print $ deRefStaticPtr (static t_field) $ T 'b'
    
    18
    - where
    
    19
    -  g :: String
    
    20
    -  g = "found"
    
    18
    +
    
    19
    +g :: String
    
    20
    +g = "found"
    
    21 21
     
    
    22 22
     lookupKey :: StaticPtr a -> IO a
    
    23 23
     lookupKey p = unsafeLookupStaticPtr (staticKey p) >>= \case
    

  • testsuite/tests/codeGen/should_run/CgStaticPointersNoFullLazyness.hs
    ... ... @@ -15,9 +15,9 @@ main = do
    15 15
       print $ deRefStaticPtr (static g)
    
    16 16
       print $ deRefStaticPtr p0 'a'
    
    17 17
       print $ deRefStaticPtr (static t_field) $ T 'b'
    
    18
    - where
    
    19
    -  g :: String
    
    20
    -  g = "found"
    
    18
    +
    
    19
    +g :: String
    
    20
    +g = "found"
    
    21 21
     
    
    22 22
     lookupKey :: StaticPtr a -> IO a
    
    23 23
     lookupKey p = unsafeLookupStaticPtr (staticKey p) >>= \case
    

  • testsuite/tests/default/default-fail05.stderr
    1 1
     default-fail05.hs:11:10: error: [GHC-39999]
    
    2
    -    • Ambiguous type variable ‘t0’ arising from a use of ‘toList’
    
    3
    -      prevents the constraint ‘(Foldable t0)’ from being solved.
    
    4
    -      Probable fix: use a type annotation to specify what ‘t0’ should be.
    
    2
    +    • Ambiguous type variable ‘f0’ arising from a use of ‘toList’
    
    3
    +      prevents the constraint ‘(Foldable f0)’ from being solved.
    
    4
    +      Probable fix: use a type annotation to specify what ‘f0’ should be.
    
    5 5
           Potentially matching instances:
    
    6 6
             instance Foldable (Either a)
    
    7 7
               -- Defined in ‘GHC.Internal.Data.Foldable’
    
    ... ... @@ -14,9 +14,9 @@ default-fail05.hs:11:10: error: [GHC-39999]
    14 14
           In a stmt of a 'do' block: print (toList $ pure 21)
    
    15 15
     
    
    16 16
     default-fail05.hs:11:19: error: [GHC-39999]
    
    17
    -    • Ambiguous type variable ‘t0’ arising from a use of ‘pure’
    
    18
    -      prevents the constraint ‘(Applicative t0)’ from being solved.
    
    19
    -      Probable fix: use a type annotation to specify what ‘t0’ should be.
    
    17
    +    • Ambiguous type variable ‘f0’ arising from a use of ‘pure’
    
    18
    +      prevents the constraint ‘(Applicative f0)’ from being solved.
    
    19
    +      Probable fix: use a type annotation to specify what ‘f0’ should be.
    
    20 20
           Potentially matching instances:
    
    21 21
             instance Applicative IO -- Defined in ‘GHC.Internal.Base’
    
    22 22
             instance Applicative Maybe -- Defined in ‘GHC.Internal.Base’
    
    ... ... @@ -28,11 +28,11 @@ default-fail05.hs:11:19: error: [GHC-39999]
    28 28
           In a stmt of a 'do' block: print (toList $ pure 21)
    
    29 29
     
    
    30 30
     default-fail05.hs:12:3: error: [GHC-39999]
    
    31
    -    • Ambiguous type variable ‘t1’ arising from a use of ‘traverse’
    
    32
    -      prevents the constraint ‘(Traversable t1)’ from being solved.
    
    31
    +    • Ambiguous type variable ‘t0’ arising from a use of ‘traverse’
    
    32
    +      prevents the constraint ‘(Traversable t0)’ from being solved.
    
    33 33
           Relevant bindings include
    
    34
    -        main :: IO (t1 ()) (bound at default-fail05.hs:10:1)
    
    35
    -      Probable fix: use a type annotation to specify what ‘t1’ should be.
    
    34
    +        main :: IO (t0 ()) (bound at default-fail05.hs:10:1)
    
    35
    +      Probable fix: use a type annotation to specify what ‘t0’ should be.
    
    36 36
           Potentially matching instances:
    
    37 37
             instance Traversable (Either a)
    
    38 38
               -- Defined in ‘GHC.Internal.Data.Traversable’
    
    ... ... @@ -51,11 +51,11 @@ default-fail05.hs:12:3: error: [GHC-39999]
    51 51
                      traverse print (pure 42)
    
    52 52
     
    
    53 53
     default-fail05.hs:12:19: error: [GHC-39999]
    
    54
    -    • Ambiguous type variable ‘t1’ arising from a use of ‘pure’
    
    55
    -      prevents the constraint ‘(Applicative t1)’ from being solved.
    
    54
    +    • Ambiguous type variable ‘t0’ arising from a use of ‘pure’
    
    55
    +      prevents the constraint ‘(Applicative t0)’ from being solved.
    
    56 56
           Relevant bindings include
    
    57
    -        main :: IO (t1 ()) (bound at default-fail05.hs:10:1)
    
    58
    -      Probable fix: use a type annotation to specify what ‘t1’ should be.
    
    57
    +        main :: IO (t0 ()) (bound at default-fail05.hs:10:1)
    
    58
    +      Probable fix: use a type annotation to specify what ‘t0’ should be.
    
    59 59
           Potentially matching instances:
    
    60 60
             instance Applicative IO -- Defined in ‘GHC.Internal.Base’
    
    61 61
             instance Applicative Maybe -- Defined in ‘GHC.Internal.Base’
    

  • testsuite/tests/indexed-types/should_fail/T1897b.stderr
    1 1
     T1897b.hs:16:1: error: [GHC-83865]
    
    2
    -    • Couldn't match type: Depend a0
    
    3
    -                     with: Depend a
    
    4
    -      Expected: t (Depend a) -> Bool
    
    5
    -        Actual: t (Depend a0) -> Bool
    
    2
    +    • Couldn't match type: Depend b0
    
    3
    +                     with: Depend b
    
    4
    +      Expected: t (Depend b) -> Bool
    
    5
    +        Actual: t (Depend b0) -> Bool
    
    6 6
           Note: ‘Depend’ is a non-injective type family.
    
    7
    -      The type variable ‘a0’ is ambiguous
    
    7
    +      The type variable ‘b0’ is ambiguous
    
    8 8
         • In the ambiguity check for the inferred type for ‘isValid’
    
    9 9
           To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
    
    10 10
           When checking the inferred type
    
    11
    -        isValid :: forall {t :: * -> *} {a}.
    
    12
    -                   (Foldable t, Bug a) =>
    
    13
    -                   t (Depend a) -> Bool
    
    11
    +        isValid :: forall {t :: * -> *} {b}.
    
    12
    +                   (Foldable t, Bug b) =>
    
    13
    +                   t (Depend b) -> Bool
    
    14 14
     

  • testsuite/tests/rename/should_fail/RnStaticPointersFail01.stderr
    1
    +RnStaticPointersFail01.hs:5:7: error: [GHC-82529]
    
    2
    +    From GHC 9.16, static forms cannot mention nested let-bound variables
    
    3
    +      Offending variables: x
    
    4
    +    Solution: move these free variables to top level
    
    1 5
     
    2
    -RnStaticPointersFail01.hs:5:7: error: [GHC-88431]
    
    3
    -    • ‘x’ is used in a static form but it is not closed because it
    
    4
    -      is not let-bound.
    
    5
    -    • In the expression: static x
    
    6
    -      In an equation for ‘f’: f x = static x

  • testsuite/tests/rename/should_fail/RnStaticPointersFail03.stderr
    1
    +RnStaticPointersFail03.hs:8:7: error: [GHC-82529]
    
    2
    +    From GHC 9.16, static forms cannot mention nested let-bound variables
    
    3
    +      Offending variables: x
    
    4
    +    Solution: move these free variables to top level
    
    1 5
     
    
    2
    -RnStaticPointersFail03.hs:8:7: error: [GHC-88431]
    
    3
    -    • ‘x’ is used in a static form but it is not closed because it
    
    4
    -      is not let-bound.
    
    5
    -    • In the expression: static (x . id)
    
    6
    -      In an equation for ‘f’: f x = static (x . id)
    
    6
    +RnStaticPointersFail03.hs:10:8: error: [GHC-82529]
    
    7
    +    From GHC 9.16, static forms cannot mention nested let-bound variables
    
    8
    +      Offending variables: k
    
    9
    +    Solution: move these free variables to top level
    
    7 10
     
    
    8
    -RnStaticPointersFail03.hs:10:8: error: [GHC-88431]
    
    9
    -    • ‘k’ is used in a static form but it is not closed because it
    
    10
    -      uses ‘x’ which is not let-bound.
    
    11
    -    • In the expression: static (k . id)
    
    12
    -      In an equation for ‘f0’:
    
    13
    -          f0 x
    
    14
    -            = static (k . id)
    
    15
    -            where
    
    16
    -                k = const (const () x)
    
    11
    +RnStaticPointersFail03.hs:14:8: error: [GHC-82529]
    
    12
    +    From GHC 9.16, static forms cannot mention nested let-bound variables
    
    13
    +      Offending variables: k
    
    14
    +    Solution: move these free variables to top level
    
    15
    +
    
    16
    +RnStaticPointersFail03.hs:19:15: error: [GHC-82529]
    
    17
    +    From GHC 9.16, static forms cannot mention nested let-bound variables
    
    18
    +      Offending variables: g
    
    19
    +    Solution: move these free variables to top level
    
    17 20
     
    18
    -RnStaticPointersFail03.hs:19:15: error: [GHC-88431]
    
    19
    -    • ‘g’ is used in a static form but it is not closed because it
    
    20
    -      uses ‘h’ which has a non-closed type because it contains the
    
    21
    -      type variables: ‘a’
    
    22
    -    • In the first argument of ‘const’, namely ‘(static (g undefined))’
    
    23
    -      In the expression: const (static (g undefined)) (h x)
    
    24
    -      In an equation for ‘f2’:
    
    25
    -          f2 x
    
    26
    -            = const (static (g undefined)) (h x)
    
    27
    -            where
    
    28
    -                g = h
    
    29
    -                h = typeOf

  • testsuite/tests/rep-poly/RepPolyRightSection.stderr
    ... ... @@ -8,6 +8,7 @@ RepPolyRightSection.hs:14:11: error: [GHC-55287]
    8 8
             • *
    
    9 9
           Cannot unify ‘r’ with the type variable ‘q0’
    
    10 10
           because the former is not a concrete ‘RuntimeRep’.
    
    11
    -    • In the expression: `g` undefined
    
    11
    +    • In the expression: g
    
    12
    +      In the expression: `g` undefined
    
    12 13
           In an equation for ‘test2’: test2 = (`g` undefined)
    
    13 14