Simon Peyton Jones pushed to branch wip/T26868 at Glasgow Haskell Compiler / GHC
Commits:
-
946aef8b
by Simon Peyton Jones at 2026-03-09T17:45:59+00:00
-
bdaba642
by Simon Peyton Jones at 2026-03-09T17:45:59+00:00
21 changed files:
- compiler/GHC/Core.hs
- compiler/GHC/Types/Var/FV.hs
- compiler/GHC/Utils/EndoOS.hs
- testsuite/tests/polykinds/T7328.stderr
- testsuite/tests/simplCore/should_compile/DsSpecPragmas.stderr
- testsuite/tests/simplCore/should_compile/T24229a.stderr
- testsuite/tests/simplCore/should_compile/T24229b.stderr
- testsuite/tests/simplCore/should_compile/T24359a.stderr
- testsuite/tests/simplCore/should_compile/T26116.stderr
- testsuite/tests/simplCore/should_compile/T4908.stderr
- testsuite/tests/simplCore/should_compile/spec-inline.stderr
- testsuite/tests/typecheck/no_skolem_info/T20063.stderr
- testsuite/tests/typecheck/should_compile/T25180.stderr
- testsuite/tests/typecheck/should_compile/free_monad_hole_fits.stderr
- testsuite/tests/typecheck/should_fail/T10971d.stderr
- testsuite/tests/typecheck/should_fail/T12589.stderr
- testsuite/tests/typecheck/should_fail/T13311.stderr
- testsuite/tests/typecheck/should_fail/T17773.stderr
- testsuite/tests/typecheck/should_fail/T2846b.stderr
- testsuite/tests/typecheck/should_fail/T7851.stderr
- testsuite/tests/typecheck/should_fail/T8603.stderr
Changes:
| ... | ... | @@ -409,7 +409,7 @@ Consider applying `exprType` to this term: |
| 409 | 409 | where we have genuine shadowing: both lambdas bind the same a. Remember: every
|
| 410 | 410 | occurrence of `x` is just a copy of the binder (x::[a]), and ditto `y`.
|
| 411 | 411 | |
| 412 | -Now what does `exprType` return for that term? It will return the bogus type
|
|
| 412 | +Now what does `exprType` return for that term? It will return the incorrect type
|
|
| 413 | 413 | |
| 414 | 414 | forall a. [a] -> forall a. a -> ([a],a)
|
| 415 | 415 |
| ... | ... | @@ -136,9 +136,9 @@ type InterestingVarFun = Var -> Bool |
| 136 | 136 | |
| 137 | 137 | type BoundVars = TyCoVarSet
|
| 138 | 138 | |
| 139 | -type VarSetFV = FV BoundVars (EndoOS TyCoVarSet)
|
|
| 140 | -type DVarSetFV = FV BoundVars (EndoOS DTyCoVarSet)
|
|
| 141 | -type SelectiveFV = FV (InterestingVarFun, BoundVars) (EndoOS DVarSet)
|
|
| 139 | +type VarSetFV = FV BoundVars (EndoOS TyCoVarSet)
|
|
| 140 | +type DVarSetFV = FV BoundVars (EndoOS DTyCoVarSet)
|
|
| 141 | +type SelectiveDFV = FV (InterestingVarFun, BoundVars) (EndoOS DVarSet)
|
|
| 142 | 142 | -- VarSetFV: collects a VarSet
|
| 143 | 143 | -- DVarSetFV: collects a DVarSet (deterministic)
|
| 144 | 144 | -- SelectiveFV: selectively collects a DVarSet
|
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | --
|
| 10 | 10 | -- It is also strict: see the (<>) method in he Semigroup instance
|
| 11 | 11 | |
| 12 | -module GHC.Utils.EndoOS( EndoOS(EndoOS, runEndoOS ), foldEndoOS ) where
|
|
| 12 | +module GHC.Utils.EndoOS( EndoOS(EndoOS, runEndoOS ) ) where
|
|
| 13 | 13 | |
| 14 | 14 | import GHC.Prelude
|
| 15 | 15 | |
| ... | ... | @@ -40,6 +40,3 @@ pattern EndoOS f <- EndoOS' f |
| 40 | 40 | EndoOS f = EndoOS' (oneShot f)
|
| 41 | 41 | -- oneShot: this is the core of the one-shot trick!
|
| 42 | 42 | -- Note [The one-shot state monad trick] in GHC.Utils.Monad. |
| 43 | - |
|
| 44 | -foldEndoOS :: Foldable t => (a -> Endo b) -> t a -> Endo b
|
|
| 45 | -foldEndoOS f xs = foldr ((<>) . f) mempty xs |
| 1 | - |
|
| 2 | 1 | T7328.hs:8:34: error: [GHC-27958]
|
| 3 | - • Expected kind ‘k1’, but ‘f’ has kind ‘k0 -> k1’
|
|
| 2 | + • Expected kind ‘k0’, but ‘f’ has kind ‘k1 -> k0’
|
|
| 4 | 3 | • In the first argument of ‘Foo’, namely ‘f’
|
| 5 | 4 | In the first argument of ‘Proxy’, namely ‘(Foo f)’
|
| 6 | 5 | In the type signature: foo :: a ~ f i => Proxy (Foo f)
|
| 6 | + |
| 1 | 1 | |
| 2 | 2 | ==================== Tidy Core rules ====================
|
| 3 | 3 | "USPEC f1 @Word @[e]"
|
| 4 | - forall (@e) ($dEq :: Eq [e]) ($dNum :: Num Word).
|
|
| 4 | + forall (@e) ($dNum :: Num Word) ($dEq :: Eq [e]).
|
|
| 5 | 5 | f1 @Word @[e] $dNum $dEq
|
| 6 | 6 | = \ _ [Occ=Dead] _ [Occ=Dead] -> I# 111#
|
| 7 | 7 | "USPEC f1 @Word @_"
|
| 8 | - forall (@e) ($dEq :: Eq e) ($dNum :: Num Word).
|
|
| 8 | + forall (@e) ($dNum :: Num Word) ($dEq :: Eq e).
|
|
| 9 | 9 | f1 @Word @e $dNum $dEq
|
| 10 | 10 | = \ _ [Occ=Dead] _ [Occ=Dead] -> I# 111#
|
| 11 | 11 | "USPEC f1_qc @_ @(g e) @Word"
|
| 12 | - forall (@e)
|
|
| 13 | - (@(g :: * -> *))
|
|
| 14 | - ($dNum :: Num Word)
|
|
| 12 | + forall (@(g :: * -> *))
|
|
| 13 | + (@e)
|
|
| 14 | + (df :: forall x. Eq x => Eq (g x))
|
|
| 15 | 15 | ($dEq :: Eq (g e))
|
| 16 | - (df :: forall x. Eq x => Eq (g x)).
|
|
| 16 | + ($dNum :: Num Word).
|
|
| 17 | 17 | f1_qc @g @(g e) @Word df $dEq $dNum
|
| 18 | 18 | = \ _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] -> C# 'q'#
|
| 19 | 19 | "USPEC f2 @_ @_ @Word"
|
| 20 | - forall (@c) ($dNum :: Num Word) ($dEq :: Eq c) ($dEq1 :: Eq c).
|
|
| 21 | - f2 @c @c @Word $dEq1 $dEq $dNum
|
|
| 20 | + forall (@c) ($dEq :: Eq c) ($dEq1 :: Eq c) ($dNum :: Num Word).
|
|
| 21 | + f2 @c @c @Word $dEq $dEq1 $dNum
|
|
| 22 | 22 | = \ _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] -> I# 2#
|
| 23 | 23 | "USPEC f3 @Int @_"
|
| 24 | 24 | forall (@(g :: * -> *))
|
| 25 | - (df :: forall x. Eq x => Eq (g x))
|
|
| 26 | - ($dEq :: Eq Int).
|
|
| 25 | + ($dEq :: Eq Int)
|
|
| 26 | + (df :: forall x. Eq x => Eq (g x)).
|
|
| 27 | 27 | f3 @Int @g $dEq df
|
| 28 | 28 | = f3_$sf3 @g df
|
| 29 | 29 | "USPEC f3 @_ @[]"
|
| 30 | - forall (@c) (df :: forall x. Eq x => Eq [x]) ($dEq :: Eq c).
|
|
| 30 | + forall (@c) ($dEq :: Eq c) (df :: forall x. Eq x => Eq [x]).
|
|
| 31 | 31 | f3 @c @[] $dEq df
|
| 32 | 32 | = f3_$sf1 @c $dEq
|
| 33 | 33 | "USPEC f4 @_ @(ST s)"
|
| 34 | - forall (@s) (@b) ($dMonad :: Monad (ST s)) ($dEq :: Eq b).
|
|
| 34 | + forall (@b) (@s) ($dEq :: Eq b) ($dMonad :: Monad (ST s)).
|
|
| 35 | 35 | f4 @b @(ST s) $dEq $dMonad
|
| 36 | 36 | = $fApplicativeST_$cpure @s @b
|
| 37 | 37 | "USPEC f4_qc @Int @_ @_"
|
| 38 | - forall (@(n :: * -> *))
|
|
| 39 | - (@(r :: (* -> *) -> * -> *))
|
|
| 40 | - (df :: forall (m :: * -> *). Monad m => Monad (r m))
|
|
| 41 | - ($dEq :: Eq Int).
|
|
| 38 | + forall (@(r :: (* -> *) -> * -> *))
|
|
| 39 | + (@(n :: * -> *))
|
|
| 40 | + ($dEq :: Eq Int)
|
|
| 41 | + (df :: forall (m :: * -> *). Monad m => Monad (r m)).
|
|
| 42 | 42 | f4_qc @Int @r @n $dEq df
|
| 43 | 43 | = \ _ [Occ=Dead] -> ()
|
| 44 | 44 | "USPEC f5 @(D Int)"
|
| 45 | 45 | forall ($dEq :: Eq (D Int)). f5 @(D Int) $dEq = f5_$sf5
|
| 46 | 46 | "USPEC f5_qc @Int @D"
|
| 47 | - forall (df :: forall x. (Eq x, Eq (T x)) => Eq (D x))
|
|
| 48 | - ($dEq :: Eq (T Int))
|
|
| 49 | - ($dEq1 :: Eq Int).
|
|
| 50 | - f5_qc @Int @D $dEq1 $dEq df
|
|
| 47 | + forall ($dEq :: Eq Int)
|
|
| 48 | + ($dEq1 :: Eq (T Int))
|
|
| 49 | + (df :: forall x. (Eq x, Eq (T x)) => Eq (D x)).
|
|
| 50 | + f5_qc @Int @D $dEq $dEq1 df
|
|
| 51 | 51 | = f5_$sf5
|
| 52 | 52 | "USPEC f5_qc @Int @_"
|
| 53 | 53 | forall (@(g :: * -> *))
|
| 54 | - (df :: forall x. (Eq x, Eq (T x)) => Eq (g x))
|
|
| 55 | - ($dEq :: Eq (T Int))
|
|
| 56 | - ($dEq1 :: Eq Int).
|
|
| 57 | - f5_qc @Int @g $dEq1 $dEq df
|
|
| 54 | + ($dEq :: Eq Int)
|
|
| 55 | + ($dEq1 :: Eq (T Int))
|
|
| 56 | + (df :: forall x. (Eq x, Eq (T x)) => Eq (g x)).
|
|
| 57 | + f5_qc @Int @g $dEq $dEq1 df
|
|
| 58 | 58 | = f5_qc_$sf5_qc @g df
|
| 59 | 59 | "USPEC f6 @_ @_ @Word"
|
| 60 | - forall (@c) ($dNum :: Num Word) ($dOrd :: Ord c) ($dEq :: Eq c).
|
|
| 60 | + forall (@c) ($dEq :: Eq c) ($dOrd :: Ord c) ($dNum :: Num Word).
|
|
| 61 | 61 | f6 @c @c @Word $dEq $dOrd $dNum
|
| 62 | 62 | = \ _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] -> C# 'c'#
|
| 63 | 63 | "USPEC f6_qc @_ @_ @Word"
|
| 64 | 64 | forall (@(h :: * -> *))
|
| 65 | - ($dNum :: Num Word)
|
|
| 66 | - (df :: forall y. Eq y => Ord (h y))
|
|
| 67 | - (df1 :: forall x. Eq x => Eq (h x)).
|
|
| 68 | - f6_qc @h @h @Word df1 df $dNum
|
|
| 65 | + (df :: forall x. Eq x => Eq (h x))
|
|
| 66 | + (df1 :: forall y. Eq y => Ord (h y))
|
|
| 67 | + ($dNum :: Num Word).
|
|
| 68 | + f6_qc @h @h @Word df df1 $dNum
|
|
| 69 | 69 | = \ _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] -> C# 'd'#
|
| 70 | 70 | "USPEC f7 @Int"
|
| 71 | - forall ($dEq :: Eq Int) ($dCls :: Cls (TF Int)).
|
|
| 71 | + forall ($dCls :: Cls (TF Int)) ($dEq :: Eq Int).
|
|
| 72 | 72 | f7 @Int $dCls $dEq
|
| 73 | 73 | = \ (x [Occ=Once1] :: Int) -> x
|
| 74 | 74 | "USPEC qcfd @C @G"
|
| 75 | - forall (df :: forall a b. C (a, b)) ($dF :: F C G).
|
|
| 75 | + forall ($dF :: F C G) (df :: forall a b. C (a, b)).
|
|
| 76 | 76 | qcfd @C @G $dF df
|
| 77 | 77 | = qcfd_x
|
| 78 | 78 |
| ... | ... | @@ -5,9 +5,9 @@ Result size of Tidy Core = {terms: 79, types: 106, coercions: 8, joins: 0/0} |
| 5 | 5 | Rec {
|
| 6 | 6 | foo_$s$wfoo
|
| 7 | 7 | = \ @a sc sc1 sc2 ->
|
| 8 | - case sc2 of ds {
|
|
| 9 | - __DEFAULT -> foo_$s$wfoo sc1 sc (-# ds 1#);
|
|
| 10 | - 0# -> (# (sc, sc1) #)
|
|
| 8 | + case sc of ds {
|
|
| 9 | + __DEFAULT -> foo_$s$wfoo (-# ds 1#) sc2 sc1;
|
|
| 10 | + 0# -> (# (sc1, sc2) #)
|
|
| 11 | 11 | }
|
| 12 | 12 | end Rec }
|
| 13 | 13 | |
| ... | ... | @@ -15,7 +15,7 @@ foo |
| 15 | 15 | = \ @a ds ds1 ->
|
| 16 | 16 | case ds of { I# ww ->
|
| 17 | 17 | case ww of ds2 {
|
| 18 | - __DEFAULT -> case ds1 `cast` <Co:4> :: ... of { (x, y) -> case foo_$s$wfoo y x (-# ds2 1#) of { (# ww1 #) -> Just ww1 } };
|
|
| 18 | + __DEFAULT -> case ds1 `cast` <Co:4> :: ... of { (x, y) -> case foo_$s$wfoo (-# ds2 1#) y x of { (# ww1 #) -> Just ww1 } };
|
|
| 19 | 19 | 0# -> Just (ds1 `cast` <Co:4> :: ...)
|
| 20 | 20 | }
|
| 21 | 21 | }
|
| ... | ... | @@ -28,11 +28,11 @@ wombat5 = "no"# |
| 28 | 28 | |
| 29 | 29 | wombat4 = unpackCString# wombat5
|
| 30 | 30 | |
| 31 | -wombat1 = case foo_$s$wfoo wombat6 wombat4 20# of { (# ww #) -> Just ww }
|
|
| 31 | +wombat1 = case foo_$s$wfoo 20# wombat6 wombat4 of { (# ww #) -> Just ww }
|
|
| 32 | 32 | |
| 33 | 33 | wombat8 = I# 3#
|
| 34 | 34 | |
| 35 | -wombat2 = \ @a xs ys -> case foo_$s$wfoo xs ys 3# of { (# ww #) -> Just ww }
|
|
| 35 | +wombat2 = \ @a xs ys -> case foo_$s$wfoo 3# xs ys of { (# ww #) -> Just ww }
|
|
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 |
| ... | ... | @@ -5,9 +5,9 @@ Result size of Tidy Core = {terms: 60, types: 83, coercions: 8, joins: 0/0} |
| 5 | 5 | Rec {
|
| 6 | 6 | foo_$s$wfoo
|
| 7 | 7 | = \ @a sc sc1 sc2 ->
|
| 8 | - case sc2 of ds {
|
|
| 9 | - __DEFAULT -> foo_$s$wfoo sc1 sc (-# ds 1#);
|
|
| 10 | - 0# -> (# (sc, sc1) #)
|
|
| 8 | + case sc of ds {
|
|
| 9 | + __DEFAULT -> foo_$s$wfoo (-# ds 1#) sc2 sc1;
|
|
| 10 | + 0# -> (# (sc1, sc2) #)
|
|
| 11 | 11 | }
|
| 12 | 12 | end Rec }
|
| 13 | 13 | |
| ... | ... | @@ -15,14 +15,14 @@ foo |
| 15 | 15 | = \ @a ds ds1 ->
|
| 16 | 16 | case ds of { I# ww ->
|
| 17 | 17 | case ww of ds2 {
|
| 18 | - __DEFAULT -> case ds1 `cast` <Co:4> :: ... of { (x, y) -> case foo_$s$wfoo y x (-# ds2 1#) of { (# ww1 #) -> Just ww1 } };
|
|
| 18 | + __DEFAULT -> case ds1 `cast` <Co:4> :: ... of { (x, y) -> case foo_$s$wfoo (-# ds2 1#) y x of { (# ww1 #) -> Just ww1 } };
|
|
| 19 | 19 | 0# -> Just (ds1 `cast` <Co:4> :: ...)
|
| 20 | 20 | }
|
| 21 | 21 | }
|
| 22 | 22 | |
| 23 | 23 | wombat1 = I# 3#
|
| 24 | 24 | |
| 25 | -wombat2 = \ @a xs ys -> case foo_$s$wfoo xs ys 3# of { (# ww #) -> Just ww }
|
|
| 25 | +wombat2 = \ @a xs ys -> case foo_$s$wfoo 3# xs ys of { (# ww #) -> Just ww }
|
|
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 |
| 1 | 1 | |
| 2 | 2 | ==================== Tidy Core rules ====================
|
| 3 | 3 | "USPEC showsIArray @UA @_"
|
| 4 | - forall (@i) ($dShow :: Show i) ($dIArray :: IArray UA).
|
|
| 4 | + forall (@i) ($dIArray :: IArray UA) ($dShow :: Show i).
|
|
| 5 | 5 | showsIArray @UA @i $dIArray $dShow
|
| 6 | 6 | = showsIArray_$sshowsIArray @i $dShow
|
| 7 | 7 | |
| 8 | + |
| 1 | 1 | |
| 2 | 2 | ==================== Tidy Core rules ====================
|
| 3 | 3 | "USPEC $cop1 @T @_"
|
| 4 | - forall (@a) ($dD :: D a) ($dEq :: Eq (T a)).
|
|
| 4 | + forall (@a) ($dEq :: Eq (T a)) ($dD :: D a).
|
|
| 5 | 5 | $fCTYPEfa_$cop1 @T @a $dEq $dD
|
| 6 | 6 | = \ _ [Occ=Dead] -> I# 3#
|
| 7 | 7 | "USPEC $fCTYPEfa @T @_"
|
| 8 | - forall (@a) ($dD :: D a) ($dEq :: Eq (T a)).
|
|
| 8 | + forall (@a) ($dEq :: Eq (T a)) ($dD :: D a).
|
|
| 9 | 9 | $fCTYPEfa @T @a $dEq $dD
|
| 10 | 10 | = $fCTYPEfa_$s$fCTYPEfa @a $dD
|
| 11 | 11 |
| ... | ... | @@ -47,14 +47,14 @@ T4908.$trModule |
| 47 | 47 | Rec {
|
| 48 | 48 | -- RHS size: {terms: 19, types: 5, coercions: 0, joins: 0/0}
|
| 49 | 49 | T4908.f_$s$wf [InlPrag=[2], Occ=LoopBreaker]
|
| 50 | - :: Int -> Int# -> Int# -> (# #)
|
|
| 51 | -[GblId, Arity=3, Str=<A><ML><1L>, Unf=OtherCon []]
|
|
| 50 | + :: Int# -> Int -> Int# -> (# #)
|
|
| 51 | +[GblId, Arity=3, Str=<1L><A><ML>, Unf=OtherCon []]
|
|
| 52 | 52 | T4908.f_$s$wf
|
| 53 | - = \ (sc :: Int) (sc1 :: Int#) (sc2 :: Int#) ->
|
|
| 54 | - case sc2 of ds {
|
|
| 53 | + = \ (sc :: Int#) (sc1 :: Int) (sc2 :: Int#) ->
|
|
| 54 | + case sc of ds {
|
|
| 55 | 55 | __DEFAULT ->
|
| 56 | - case sc1 of ds1 {
|
|
| 57 | - __DEFAULT -> T4908.f_$s$wf sc ds1 (-# ds 1#);
|
|
| 56 | + case sc2 of ds1 {
|
|
| 57 | + __DEFAULT -> T4908.f_$s$wf (-# ds 1#) sc1 ds1;
|
|
| 58 | 58 | 0# -> GHC.Internal.Types.(##)
|
| 59 | 59 | };
|
| 60 | 60 | 0# -> GHC.Internal.Types.(##)
|
| ... | ... | @@ -78,7 +78,7 @@ f [InlPrag=[2]] :: Int -> (Int, Int) -> Bool |
| 78 | 78 | case b of { I# ds2 [Occ=Once1!] ->
|
| 79 | 79 | case ds2 of ds3 [Occ=Once1] {
|
| 80 | 80 | __DEFAULT ->
|
| 81 | - case T4908.f_$s$wf a ds3 (-# ds1 1#) of { (# #) ->
|
|
| 81 | + case T4908.f_$s$wf (-# ds1 1#) a ds3 of { (# #) ->
|
|
| 82 | 82 | GHC.Internal.Types.True
|
| 83 | 83 | };
|
| 84 | 84 | 0# -> GHC.Internal.Types.True
|
| ... | ... | @@ -96,7 +96,7 @@ f = \ (ds :: Int) (x :: (Int, Int)) -> |
| 96 | 96 | case b of { I# ds2 ->
|
| 97 | 97 | case ds2 of ds3 {
|
| 98 | 98 | __DEFAULT ->
|
| 99 | - case T4908.f_$s$wf a ds3 (-# ds1 1#) of { (# #) ->
|
|
| 99 | + case T4908.f_$s$wf (-# ds1 1#) a ds3 of { (# #) ->
|
|
| 100 | 100 | GHC.Internal.Types.True
|
| 101 | 101 | };
|
| 102 | 102 | 0# -> GHC.Internal.Types.True
|
| ... | ... | @@ -20,23 +20,23 @@ Rec { |
| 20 | 20 | Roman.foo_$s$wgo [InlPrag=[2], Occ=LoopBreaker]
|
| 21 | 21 | :: GHC.Internal.Prim.Int#
|
| 22 | 22 | -> GHC.Internal.Prim.Int# -> GHC.Internal.Prim.Int#
|
| 23 | -[GblId, Arity=2, Str=<A><L>, Unf=OtherCon []]
|
|
| 23 | +[GblId, Arity=2, Str=<L><A>, Unf=OtherCon []]
|
|
| 24 | 24 | Roman.foo_$s$wgo
|
| 25 | 25 | = \ (sc :: GHC.Internal.Prim.Int#)
|
| 26 | 26 | (sc1 :: GHC.Internal.Prim.Int#) ->
|
| 27 | - case GHC.Internal.Prim.<=# sc1 0# of {
|
|
| 27 | + case GHC.Internal.Prim.<=# sc 0# of {
|
|
| 28 | 28 | __DEFAULT ->
|
| 29 | - case GHC.Internal.Prim.<# sc1 100# of {
|
|
| 29 | + case GHC.Internal.Prim.<# sc 100# of {
|
|
| 30 | 30 | __DEFAULT ->
|
| 31 | - case GHC.Internal.Prim.<# sc1 500# of {
|
|
| 31 | + case GHC.Internal.Prim.<# sc 500# of {
|
|
| 32 | 32 | __DEFAULT ->
|
| 33 | 33 | Roman.foo_$s$wgo
|
| 34 | - (GHC.Internal.Prim.*# 14# sc) (GHC.Internal.Prim.-# sc1 1#);
|
|
| 34 | + (GHC.Internal.Prim.-# sc 1#) (GHC.Internal.Prim.*# 14# sc1);
|
|
| 35 | 35 | 1# ->
|
| 36 | 36 | Roman.foo_$s$wgo
|
| 37 | - (GHC.Internal.Prim.*# 7# sc) (GHC.Internal.Prim.-# sc1 3#)
|
|
| 37 | + (GHC.Internal.Prim.-# sc 3#) (GHC.Internal.Prim.*# 7# sc1)
|
|
| 38 | 38 | };
|
| 39 | - 1# -> Roman.foo_$s$wgo sc (GHC.Internal.Prim.-# sc1 2#)
|
|
| 39 | + 1# -> Roman.foo_$s$wgo (GHC.Internal.Prim.-# sc 2#) sc1
|
|
| 40 | 40 | };
|
| 41 | 41 | 1# -> 0#
|
| 42 | 42 | }
|
| ... | ... | @@ -58,7 +58,7 @@ Roman.$wgo |
| 58 | 58 | Just x ->
|
| 59 | 59 | case x of { GHC.Internal.Types.I# ipv ->
|
| 60 | 60 | case u of {
|
| 61 | - Nothing -> Roman.foo_$s$wgo (GHC.Internal.Prim.*# 7# ipv) 10#;
|
|
| 61 | + Nothing -> Roman.foo_$s$wgo 10# (GHC.Internal.Prim.*# 7# ipv);
|
|
| 62 | 62 | Just n ->
|
| 63 | 63 | case n of { GHC.Internal.Types.I# x2 ->
|
| 64 | 64 | case GHC.Internal.Prim.<=# x2 0# of {
|
| ... | ... | @@ -68,12 +68,12 @@ Roman.$wgo |
| 68 | 68 | case GHC.Internal.Prim.<# x2 500# of {
|
| 69 | 69 | __DEFAULT ->
|
| 70 | 70 | Roman.foo_$s$wgo
|
| 71 | - (GHC.Internal.Prim.*# 14# ipv) (GHC.Internal.Prim.-# x2 1#);
|
|
| 71 | + (GHC.Internal.Prim.-# x2 1#) (GHC.Internal.Prim.*# 14# ipv);
|
|
| 72 | 72 | 1# ->
|
| 73 | 73 | Roman.foo_$s$wgo
|
| 74 | - (GHC.Internal.Prim.*# 7# ipv) (GHC.Internal.Prim.-# x2 3#)
|
|
| 74 | + (GHC.Internal.Prim.-# x2 3#) (GHC.Internal.Prim.*# 7# ipv)
|
|
| 75 | 75 | };
|
| 76 | - 1# -> Roman.foo_$s$wgo ipv (GHC.Internal.Prim.-# x2 2#)
|
|
| 76 | + 1# -> Roman.foo_$s$wgo (GHC.Internal.Prim.-# x2 2#) ipv
|
|
| 77 | 77 | };
|
| 78 | 78 | 1# -> 0#
|
| 79 | 79 | }
|
| ... | ... | @@ -134,7 +134,7 @@ foo :: Int -> Int |
| 134 | 134 | foo
|
| 135 | 135 | = \ (n :: Int) ->
|
| 136 | 136 | case n of { GHC.Internal.Types.I# ipv ->
|
| 137 | - case Roman.foo_$s$wgo 6# ipv of ww { __DEFAULT ->
|
|
| 137 | + case Roman.foo_$s$wgo ipv 6# of ww { __DEFAULT ->
|
|
| 138 | 138 | GHC.Internal.Types.I# ww
|
| 139 | 139 | }
|
| 140 | 140 | }
|
| ... | ... | @@ -145,8 +145,8 @@ foo |
| 145 | 145 | forall (sc :: GHC.Internal.Prim.Int#)
|
| 146 | 146 | (sc1 :: GHC.Internal.Prim.Int#).
|
| 147 | 147 | Roman.$wgo (GHC.Internal.Maybe.Just
|
| 148 | - @Int (GHC.Internal.Types.I# sc1))
|
|
| 149 | - (GHC.Internal.Maybe.Just @Int (GHC.Internal.Types.I# sc))
|
|
| 148 | + @Int (GHC.Internal.Types.I# sc))
|
|
| 149 | + (GHC.Internal.Maybe.Just @Int (GHC.Internal.Types.I# sc1))
|
|
| 150 | 150 | = Roman.foo_$s$wgo sc sc1
|
| 151 | 151 | |
| 152 | 152 |
| 1 | 1 | T20063.hs:25:21: error: [GHC-25897]
|
| 2 | - • Could not deduce ‘ctx6 ~ (ctx0 :*& l0)’
|
|
| 3 | - from the context: (ctx4 ~ Extend ctx1, ctx5 ~ Extend ctx2)
|
|
| 2 | + • Could not deduce ‘ctx4 ~ (ctx0 :*& l0)’
|
|
| 3 | + from the context: (ctx1 ~ Extend ctx2, ctx2 ~ Extend ctx1)
|
|
| 4 | 4 | bound by a pattern with constructor:
|
| 5 | 5 | U :: forall {k} (ctx1 :: Context) (ctx2 :: Context) (l :: k).
|
| 6 | 6 | Rn ctx1 ctx2 -> Rn (ctx1 :*& l) (ctx2 :*& l),
|
| 7 | 7 | in an equation for ‘rnRename’
|
| 8 | 8 | at T20063.hs:25:11-13
|
| 9 | - Expected: Idx ctx6
|
|
| 9 | + Expected: Idx ctx4
|
|
| 10 | 10 | Actual: Idx (ctx0 :*& l0)
|
| 11 | - ‘ctx6’ is a rigid type variable bound by
|
|
| 11 | + ‘ctx4’ is a rigid type variable bound by
|
|
| 12 | 12 | the type signature for:
|
| 13 | - rnRename :: forall (ctx4 :: Context) (ctx5 :: Context)
|
|
| 14 | - (ctx3 :: Context) (ctx6 :: Context).
|
|
| 15 | - Rn ctx4 ctx5 -> Idx ctx3 -> Idx ctx6
|
|
| 13 | + rnRename :: forall (ctx7 :: Context) (ctx8 :: Context)
|
|
| 14 | + (ctx3 :: Context) (ctx4 :: Context).
|
|
| 15 | + Rn ctx7 ctx8 -> Idx ctx3 -> Idx ctx4
|
|
| 16 | 16 | at T20063.hs:24:1-48
|
| 17 | 17 | • In the expression: T _
|
| 18 | 18 | In an equation for ‘rnRename’: rnRename (U _) _ = T _
|
| 19 | 19 | • Relevant bindings include
|
| 20 | - rnRename :: Rn ctx4 ctx5 -> Idx ctx3 -> Idx ctx6
|
|
| 20 | + rnRename :: Rn ctx7 ctx8 -> Idx ctx3 -> Idx ctx4
|
|
| 21 | 21 | (bound at T20063.hs:25:1)
|
| 22 | 22 | |
| 23 | 23 | T20063.hs:26:17: error: [GHC-27346]
|
| ... | ... | @@ -146,7 +146,7 @@ T25180.hs:66:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] |
| 146 | 146 | |
| 147 | 147 | T25180.hs:73:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
|
| 148 | 148 | • Found hole: _ :: b -> (# a | b #)
|
| 149 | - Where: ‘a’, ‘b’ are rigid type variables bound by
|
|
| 149 | + Where: ‘b’, ‘a’ are rigid type variables bound by
|
|
| 150 | 150 | the type signature for:
|
| 151 | 151 | usum2_2 :: forall b a. b -> (# a | b #)
|
| 152 | 152 | at T25180.hs:72:1-27
|
| ... | ... | @@ -176,7 +176,7 @@ T25180.hs:80:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] |
| 176 | 176 | |
| 177 | 177 | T25180.hs:87:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
|
| 178 | 178 | • Found hole: _ :: b -> (# a | b | c #)
|
| 179 | - Where: ‘a’, ‘b’, ‘c’ are rigid type variables bound by
|
|
| 179 | + Where: ‘b’, ‘a’, ‘c’ are rigid type variables bound by
|
|
| 180 | 180 | the type signature for:
|
| 181 | 181 | usum3_2 :: forall b a c. b -> (# a | b | c #)
|
| 182 | 182 | at T25180.hs:86:1-31
|
| ... | ... | @@ -191,7 +191,7 @@ T25180.hs:87:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] |
| 191 | 191 | |
| 192 | 192 | T25180.hs:94:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
|
| 193 | 193 | • Found hole: _ :: c -> (# a | b | c #)
|
| 194 | - Where: ‘a’, ‘b’, ‘c’ are rigid type variables bound by
|
|
| 194 | + Where: ‘c’, ‘a’, ‘b’ are rigid type variables bound by
|
|
| 195 | 195 | the type signature for:
|
| 196 | 196 | usum3_3 :: forall c a b. c -> (# a | b | c #)
|
| 197 | 197 | at T25180.hs:93:1-31
|
| 1 | 1 | free_monad_hole_fits.hs:14:28: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
|
| 2 | 2 | • Found hole:
|
| 3 | 3 | _a :: (Free f a -> Free f b) -> f (Free f a) -> f (Free f b)
|
| 4 | - Where: ‘a’, ‘b’ are rigid type variables bound by
|
|
| 4 | + Where: ‘f’ is a rigid type variable bound by
|
|
| 5 | + the instance declaration
|
|
| 6 | + at free_monad_hole_fits.hs:10:10-38
|
|
| 7 | + ‘a’, ‘b’ are rigid type variables bound by
|
|
| 5 | 8 | the type signature for:
|
| 6 | 9 | fmap :: forall a b. (a -> b) -> Free f a -> Free f b
|
| 7 | 10 | at free_monad_hole_fits.hs:11:5-8
|
| 8 | - ‘f’ is a rigid type variable bound by
|
|
| 9 | - the instance declaration
|
|
| 10 | - at free_monad_hole_fits.hs:10:10-38
|
|
| 11 | 11 | Or perhaps ‘_a’ is mis-spelled, or not in scope
|
| 12 | 12 | • In the first argument of ‘Free’, namely ‘(_a go fa)’
|
| 13 | 13 | In the expression: Free (_a go fa)
|
| ... | ... | @@ -35,13 +35,13 @@ free_monad_hole_fits.hs:14:28: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault |
| 35 | 35 | |
| 36 | 36 | free_monad_hole_fits.hs:25:31: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
|
| 37 | 37 | • Found hole: _a :: Free f a -> Free f b
|
| 38 | - Where: ‘a’, ‘b’ are rigid type variables bound by
|
|
| 38 | + Where: ‘f’ is a rigid type variable bound by
|
|
| 39 | + the instance declaration
|
|
| 40 | + at free_monad_hole_fits.hs:22:10-40
|
|
| 41 | + ‘a’, ‘b’ are rigid type variables bound by
|
|
| 39 | 42 | the type signature for:
|
| 40 | 43 | (>>=) :: forall a b. Free f a -> (a -> Free f b) -> Free f b
|
| 41 | 44 | at free_monad_hole_fits.hs:23:12-14
|
| 42 | - ‘f’ is a rigid type variable bound by
|
|
| 43 | - the instance declaration
|
|
| 44 | - at free_monad_hole_fits.hs:22:10-40
|
|
| 45 | 45 | Or perhaps ‘_a’ is mis-spelled, or not in scope
|
| 46 | 46 | • In the first argument of ‘fmap’, namely ‘_a’
|
| 47 | 47 | In the first argument of ‘Free’, namely ‘(fmap _a f)’
|
| 1 | - |
|
| 2 | 1 | T10971d.hs:4:14: error: [GHC-83865]
|
| 3 | - • Couldn't match expected type: [a0]
|
|
| 4 | - with actual type: Maybe a3
|
|
| 2 | + • Couldn't match expected type: [a1]
|
|
| 3 | + with actual type: Maybe a0
|
|
| 5 | 4 | • In the first argument of ‘f’, namely ‘(Just 1)’
|
| 6 | 5 | In the second argument of ‘($)’, namely ‘f (Just 1)’
|
| 7 | 6 | In a stmt of a 'do' block: print $ f (Just 1)
|
| 8 | 7 | |
| 9 | 8 | T10971d.hs:5:19: error: [GHC-83865]
|
| 10 | 9 | • Couldn't match expected type: [b0]
|
| 11 | - with actual type: Maybe a4
|
|
| 10 | + with actual type: Maybe a2
|
|
| 12 | 11 | • In the second argument of ‘g’, namely ‘(Just 5)’
|
| 13 | 12 | In the second argument of ‘($)’, namely ‘g (+ 1) (Just 5)’
|
| 14 | 13 | In a stmt of a 'do' block: print $ g (+ 1) (Just 5)
|
| 15 | 14 | |
| 16 | 15 | T10971d.hs:6:23: error: [GHC-83865]
|
| 17 | - • Couldn't match expected type: [a2]
|
|
| 18 | - with actual type: Maybe a1
|
|
| 16 | + • Couldn't match expected type: [a4]
|
|
| 17 | + with actual type: Maybe a3
|
|
| 19 | 18 | • In the second argument of ‘h’, namely ‘Nothing’
|
| 20 | 19 | In the second argument of ‘($)’, namely ‘h (const 5) Nothing’
|
| 21 | 20 | In a stmt of a 'do' block: print $ h (const 5) Nothing
|
| 21 | + |
| 1 | - |
|
| 2 | 1 | T12589.hs:13:3: error: [GHC-88464]
|
| 3 | - Variable not in scope: (&) :: t0 -> t1 -> t |
|
| 2 | + Variable not in scope: (&) :: t1 -> t0 -> t
|
|
| 3 | + |
| 1 | - |
|
| 2 | 1 | T13311.hs:9:3: error: [GHC-83865]
|
| 3 | - • Couldn't match expected type: IO a0
|
|
| 4 | - with actual type: Maybe a1 -> Maybe b0
|
|
| 2 | + • Couldn't match expected type: IO a1
|
|
| 3 | + with actual type: Maybe a0 -> Maybe b0
|
|
| 5 | 4 | • Probable cause: ‘f’ is applied to too few arguments
|
| 6 | 5 | In a stmt of a 'do' block: f
|
| 7 | 6 | In the expression:
|
| ... | ... | @@ -10,3 +9,4 @@ T13311.hs:9:3: error: [GHC-83865] |
| 10 | 9 | In an equation for ‘g’:
|
| 11 | 10 | g = do f
|
| 12 | 11 | putChar 'a'
|
| 12 | + |
| 1 | - |
|
| 2 | 1 | T17773.hs:16:22: error: [GHC-88464]
|
| 3 | 2 | • Found hole: _Refl :: Mzero x y :~: (x <|> y)
|
| 4 | - Where: ‘x’, ‘f’, ‘k’, ‘a’, ‘y’ are rigid type variables bound by
|
|
| 3 | + Where: ‘k’, ‘f’, ‘a’, ‘x’, ‘y’ are rigid type variables bound by
|
|
| 5 | 4 | the type signature for:
|
| 6 | 5 | monadPlusMplus :: forall {k} (f :: k -> *) (a :: k) (x :: f a)
|
| 7 | 6 | (y :: f a).
|
| ... | ... | @@ -12,3 +11,4 @@ T17773.hs:16:22: error: [GHC-88464] |
| 12 | 11 | • Relevant bindings include
|
| 13 | 12 | monadPlusMplus :: Proxy x -> Proxy y -> Mzero x y :~: (x <|> y)
|
| 14 | 13 | (bound at T17773.hs:16:1)
|
| 14 | + |
| 1 | - |
|
| 2 | 1 | T2846b.hs:5:10: error: [GHC-91028]
|
| 3 | - • Couldn't match expected type ‘a1’
|
|
| 4 | - with actual type ‘[Num a0 => a0]’
|
|
| 5 | - Cannot instantiate unification variable ‘a1’
|
|
| 6 | - with a type involving polytypes: [Num a0 => a0]
|
|
| 2 | + • Couldn't match expected type ‘a0’
|
|
| 3 | + with actual type ‘[Num a1 => a1]’
|
|
| 4 | + Cannot instantiate unification variable ‘a0’
|
|
| 5 | + with a type involving polytypes: [Num a1 => a1]
|
|
| 7 | 6 | • In the first argument of ‘show’, namely
|
| 8 | 7 | ‘([1, 2, 3] :: [Num a => a])’
|
| 9 | 8 | In the expression: show ([1, 2, 3] :: [Num a => a])
|
| 10 | 9 | In an equation for ‘f’: f = show ([1, 2, 3] :: [Num a => a])
|
| 10 | + |
| 1 | - |
|
| 2 | 1 | T7851.hs:5:10: error: [GHC-83865]
|
| 3 | - • Couldn't match expected type: IO a0
|
|
| 4 | - with actual type: a1 -> IO ()
|
|
| 2 | + • Couldn't match expected type: IO a1
|
|
| 3 | + with actual type: a0 -> IO ()
|
|
| 5 | 4 | • Probable cause: ‘print’ is applied to too few arguments
|
| 6 | 5 | In a stmt of a 'do' block: print
|
| 7 | 6 | In the expression:
|
| ... | ... | @@ -11,3 +10,4 @@ T7851.hs:5:10: error: [GHC-83865] |
| 11 | 10 | bar
|
| 12 | 11 | = do print
|
| 13 | 12 | print "Hello"
|
| 13 | + |
| ... | ... | @@ -2,9 +2,9 @@ T8603.hs:33:17: error: [GHC-18872] |
| 2 | 2 | • Couldn't match kind ‘*’ with ‘* -> *’
|
| 3 | 3 | When matching types
|
| 4 | 4 | m0 :: * -> *
|
| 5 | - [a2] :: *
|
|
| 6 | - Expected: [a2] -> StateT s RV a1
|
|
| 7 | - Actual: t0 m0 (StateT s RV a1)
|
|
| 5 | + [a0] :: *
|
|
| 6 | + Expected: [a0] -> StateT s RV a2
|
|
| 7 | + Actual: t0 m0 (StateT s RV a2)
|
|
| 8 | 8 | • The function ‘lift’ is applied to two visible arguments,
|
| 9 | 9 | but its type ‘(Control.Monad.Trans.Class.MonadTrans t, Monad m) =>
|
| 10 | 10 | m a -> t m a’
|