Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
26b9a8a0
by Arkissa at 2026-10-17T16:04:10+00:00
12 changed files:
- + changelog.d/T27412
- ghc/GHCi/UI/Info.hs
- testsuite/tests/ghci/prog-mhu001/prog-mhu001c.stdout
- testsuite/tests/ghci/prog-mhu002/prog-mhu002d.stdout
- testsuite/tests/ghci/scripts/T16575.script
- testsuite/tests/ghci/scripts/T16575.stdout
- testsuite/tests/ghci/scripts/T16804.stdout
- testsuite/tests/ghci/scripts/T20150.stdout
- + testsuite/tests/ghci/scripts/T27412.hs
- + testsuite/tests/ghci/scripts/T27412.script
- + testsuite/tests/ghci/scripts/T27412.stdout
- testsuite/tests/ghci/scripts/all.T
Changes:
| 1 | +section: ghci
|
|
| 2 | +synopsis: Make ``:type-at`` prefer an exact source span match.
|
|
| 3 | +issues: #27412
|
|
| 4 | +mrs: !16332
|
|
| 5 | + |
|
| 6 | +description: {
|
|
| 7 | + GHCi's ``:type-at`` command now prefers type information whose source
|
|
| 8 | + span exactly matches the requested range. This prevents a multi-line
|
|
| 9 | + selection from incorrectly returning the type of a contained expression.
|
|
| 10 | +} |
| ... | ... | @@ -61,6 +61,7 @@ data ModInfo = ModInfo |
| 61 | 61 | -- ^ Generated set of information about all spans in the
|
| 62 | 62 | -- module that correspond to some kind of identifier for
|
| 63 | 63 | -- which there will be type info and/or location info.
|
| 64 | + -- Sorted by 'leftmost_largest', with enclosing spans before contained spans.
|
|
| 64 | 65 | , modinfoRdrEnv :: !IfGlobalRdrEnv
|
| 65 | 66 | -- ^ What's in scope in the module.
|
| 66 | 67 | , modinfoLastUpdate :: !UTCTime
|
| ... | ... | @@ -202,7 +203,7 @@ resolveNameFromModule infos name = do |
| 202 | 203 | -- | Try to resolve the type display from the given span.
|
| 203 | 204 | resolveName :: [SpanInfo] -> SpanInfo -> Maybe Var
|
| 204 | 205 | resolveName spans' si = listToMaybe $ mapMaybe spaninfoVar $
|
| 205 | - reverse spans' `spaninfosWithin` si
|
|
| 206 | + spans' `spaninfosWithin` si
|
|
| 206 | 207 | |
| 207 | 208 | -- | Try to find the type of the given span.
|
| 208 | 209 | findType :: GhcMonad m
|
| ... | ... | @@ -224,7 +225,7 @@ findType infos span0 string = do |
| 224 | 225 | -- | Try to resolve the type display from the given span.
|
| 225 | 226 | resolveType :: [SpanInfo] -> SpanInfo -> Maybe Type
|
| 226 | 227 | resolveType spans' si = listToMaybe $ mapMaybe spaninfoType $
|
| 227 | - reverse spans' `spaninfosWithin` si
|
|
| 228 | + spans' `spaninfosWithin` si
|
|
| 228 | 229 | |
| 229 | 230 | -- | Guess a module name from a file path.
|
| 230 | 231 | guessModule :: GhcMonad m
|
| ... | ... | @@ -333,7 +334,7 @@ processAllTypeCheckedModule :: TypecheckedModule -> [SpanInfo] |
| 333 | 334 | processAllTypeCheckedModule tcm
|
| 334 | 335 | = mapMaybe toSpanInfo
|
| 335 | 336 | $ sortBy cmpSpan
|
| 336 | - $ catMaybes (bts ++ ets ++ pts)
|
|
| 337 | + $ catMaybes (ets ++ bts ++ pts)
|
|
| 337 | 338 | where
|
| 338 | 339 | bts = map getTypeLHsBind $ listifyAllSpans tcs
|
| 339 | 340 | ets = map getTypeLHsExpr $ listifyAllSpans tcs
|
| ... | ... | @@ -384,10 +385,8 @@ processAllTypeCheckedModule tcm |
| 384 | 385 | | (False `mkQ` (const True :: OverLitTc -> Bool)) x = z
|
| 385 | 386 | | otherwise = foldl k (f x) (gmapQ (everythingAllSpans k z f) x)
|
| 386 | 387 | |
| 387 | - cmpSpan (_,a,_) (_,b,_)
|
|
| 388 | - | a `isSubspanOf` b = LT
|
|
| 389 | - | b `isSubspanOf` a = GT
|
|
| 390 | - | otherwise = EQ
|
|
| 388 | + -- Put enclosing spans first so :type-at prefers exact matches. See (#27412).
|
|
| 389 | + cmpSpan (_,a,_) (_,b,_) = leftmost_largest a b
|
|
| 391 | 390 | |
| 392 | 391 | -- | Pretty print the types into a 'SpanInfo'.
|
| 393 | 392 | toSpanInfo :: (Maybe Id,SrcSpan,Type) -> Maybe SpanInfo
|
| 1 | 1 | Collecting type info for 1 module(s) ...
|
| 2 | 2 | :all-types
|
| 3 | -e/E.hs:(24,1)-(24,12): GHC.Internal.Types.IO ()
|
|
| 4 | -e/E.hs:(19,1)-(19,3): E.E -> E.E
|
|
| 5 | -e/E.hs:(5,1)-(5,3): GHC.Internal.Bignum.Integer.Integer
|
|
| 6 | 3 | e/E.hs:(3,1)-(3,3): GHC.Internal.Bignum.Integer.Integer
|
| 7 | -e/E.hs:(7,1)-(7,4): GHC.Internal.Types.IO ()
|
|
| 8 | -e/E.hs:(15,3)-(15,6): GHC.Internal.Types.Int -> GHC.Internal.Base.String
|
|
| 9 | -e/E.hs:(22,3)-(22,6): E.E -> GHC.Internal.Base.String
|
|
| 10 | -e/E.hs:(25,3)-(25,10): GHC.Internal.Base.String -> GHC.Internal.Types.IO ()
|
|
| 11 | -e/E.hs:(25,12)-(25,37): GHC.Internal.Base.String
|
|
| 12 | -e/E.hs:(25,3)-(25,37): GHC.Internal.Types.IO ()
|
|
| 13 | -e/E.hs:(24,16)-(25,37): GHC.Internal.Types.IO ()
|
|
| 14 | -e/E.hs:(19,9)-(19,9): E.E
|
|
| 15 | -e/E.hs:(5,7)-(5,8): GHC.Internal.Bignum.Integer.Integer
|
|
| 16 | 4 | e/E.hs:(3,7)-(3,7): GHC.Internal.Bignum.Integer.Integer
|
| 5 | +e/E.hs:(5,1)-(5,3): GHC.Internal.Bignum.Integer.Integer
|
|
| 6 | +e/E.hs:(5,7)-(5,8): GHC.Internal.Bignum.Integer.Integer
|
|
| 7 | +e/E.hs:(7,1)-(7,4): GHC.Internal.Types.IO ()
|
|
| 8 | +e/E.hs:(7,8)-(9,11): GHC.Internal.Types.IO ()
|
|
| 9 | +e/E.hs:(8,3)-(8,11): GHC.Internal.Types.IO ()
|
|
| 17 | 10 | e/E.hs:(8,3)-(8,7): GHC.Internal.Bignum.Integer.Integer -> GHC.Internal.Types.IO ()
|
| 18 | 11 | e/E.hs:(8,9)-(8,11): GHC.Internal.Bignum.Integer.Integer
|
| 19 | -e/E.hs:(8,3)-(8,11): GHC.Internal.Types.IO ()
|
|
| 12 | +e/E.hs:(9,3)-(9,11): GHC.Internal.Types.IO ()
|
|
| 20 | 13 | e/E.hs:(9,3)-(9,7): GHC.Internal.Bignum.Integer.Integer -> GHC.Internal.Types.IO ()
|
| 21 | 14 | e/E.hs:(9,9)-(9,11): GHC.Internal.Bignum.Integer.Integer
|
| 22 | -e/E.hs:(9,3)-(9,11): GHC.Internal.Types.IO ()
|
|
| 23 | -e/E.hs:(7,8)-(9,11): GHC.Internal.Types.IO ()
|
|
| 24 | 15 | e/E.hs:(14,10)-(14,17): E.Test GHC.Internal.Types.Int
|
| 25 | 16 | e/E.hs:(14,10)-(14,17): (GHC.Internal.Types.Int -> GHC.Internal.Base.String) -=> E.Test GHC.Internal.Types.Int
|
| 26 | 17 | e/E.hs:(14,10)-(14,17): GHC.Internal.Types.Int -> GHC.Internal.Base.String
|
| 18 | +e/E.hs:(15,3)-(15,6): GHC.Internal.Types.Int -> GHC.Internal.Base.String
|
|
| 27 | 19 | e/E.hs:(15,10)-(15,13): GHC.Internal.Types.Int -> GHC.Internal.Base.String
|
| 20 | +e/E.hs:(19,1)-(19,3): E.E -> E.E
|
|
| 21 | +e/E.hs:(19,5)-(19,5): E.E
|
|
| 22 | +e/E.hs:(19,9)-(19,9): E.E
|
|
| 28 | 23 | e/E.hs:(21,10)-(21,15): E.Test E.E
|
| 29 | 24 | e/E.hs:(21,10)-(21,15): (E.E -> GHC.Internal.Base.String) -=> E.Test E.E
|
| 30 | 25 | e/E.hs:(21,10)-(21,15): E.E -> GHC.Internal.Base.String
|
| 31 | -e/E.hs:(22,12)-(22,14): GHC.Internal.Base.String
|
|
| 32 | -e/E.hs:(19,5)-(19,5): E.E
|
|
| 26 | +e/E.hs:(22,3)-(22,6): E.E -> GHC.Internal.Base.String
|
|
| 33 | 27 | e/E.hs:(22,8)-(22,8): E.E
|
| 28 | +e/E.hs:(22,12)-(22,14): GHC.Internal.Base.String
|
|
| 29 | +e/E.hs:(24,1)-(24,12): GHC.Internal.Types.IO ()
|
|
| 30 | +e/E.hs:(24,16)-(25,37): GHC.Internal.Types.IO ()
|
|
| 31 | +e/E.hs:(25,3)-(25,37): GHC.Internal.Types.IO ()
|
|
| 32 | +e/E.hs:(25,3)-(25,10): GHC.Internal.Base.String -> GHC.Internal.Types.IO ()
|
|
| 33 | +e/E.hs:(25,12)-(25,37): GHC.Internal.Base.String
|
|
| 34 | 34 | :type-at
|
| 35 | 35 | :: Integer
|
| 36 | 36 | :: Int -> String
|
| 1 | 1 | Collecting type info for 4 module(s) ...
|
| 2 | -a/A.hs:(7,1)-(7,6): GHC.Internal.Bignum.Integer.Integer
|
|
| 3 | 2 | a/A.hs:(5,1)-(5,3): GHC.Internal.Bignum.Integer.Integer
|
| 4 | -a/A.hs:(9,22)-(9,25): GHC.Internal.Types.Int -> A.A -> GHC.Internal.Show.ShowS
|
|
| 5 | -a/A.hs:(9,22)-(9,25): A.A -> GHC.Internal.Base.String
|
|
| 6 | -a/A.hs:(9,22)-(9,25): [A.A] -> GHC.Internal.Show.ShowS
|
|
| 7 | -a/A.hs:(12,3)-(12,6): A.A -> GHC.Internal.Base.String
|
|
| 8 | -a/A.hs:(7,10)-(7,11): GHC.Internal.Bignum.Integer.Integer
|
|
| 9 | -a/A.hs:(5,11)-(5,11): GHC.Internal.Bignum.Integer.Integer -> GHC.Internal.Bignum.Integer.Integer -> GHC.Internal.Bignum.Integer.Integer
|
|
| 3 | +a/A.hs:(5,7)-(5,18): GHC.Internal.Bignum.Integer.Integer
|
|
| 10 | 4 | a/A.hs:(5,7)-(5,9): GHC.Internal.Bignum.Integer.Integer
|
| 5 | +a/A.hs:(5,11)-(5,11): GHC.Internal.Bignum.Integer.Integer -> GHC.Internal.Bignum.Integer.Integer -> GHC.Internal.Bignum.Integer.Integer
|
|
| 11 | 6 | a/A.hs:(5,13)-(5,18): GHC.Internal.Bignum.Integer.Integer
|
| 12 | -a/A.hs:(5,7)-(5,18): GHC.Internal.Bignum.Integer.Integer
|
|
| 7 | +a/A.hs:(7,1)-(7,6): GHC.Internal.Bignum.Integer.Integer
|
|
| 8 | +a/A.hs:(7,10)-(7,11): GHC.Internal.Bignum.Integer.Integer
|
|
| 13 | 9 | a/A.hs:(9,22)-(9,25): GHC.Internal.Show.Show A.A
|
| 14 | 10 | a/A.hs:(9,22)-(9,25): ([A.A] -> GHC.Internal.Show.ShowS) -=> GHC.Internal.Show.Show A.A
|
| 15 | 11 | a/A.hs:(9,22)-(9,25): (A.A -> GHC.Internal.Base.String) -=> ([A.A] -> GHC.Internal.Show.ShowS) -=> GHC.Internal.Show.Show A.A
|
| ... | ... | @@ -17,25 +13,29 @@ a/A.hs:(9,22)-(9,25): (GHC.Internal.Types.Int -> A.A -> GHC.Internal.Show.ShowS) |
| 17 | 13 | a/A.hs:(9,22)-(9,25): GHC.Internal.Types.Int -> A.A -> GHC.Internal.Show.ShowS
|
| 18 | 14 | a/A.hs:(9,22)-(9,25): A.A -> GHC.Internal.Base.String
|
| 19 | 15 | a/A.hs:(9,22)-(9,25): [A.A] -> GHC.Internal.Show.ShowS
|
| 16 | +a/A.hs:(9,22)-(9,25): GHC.Internal.Types.Int -> A.A -> GHC.Internal.Show.ShowS
|
|
| 17 | +a/A.hs:(9,22)-(9,25): A.A -> GHC.Internal.Base.String
|
|
| 18 | +a/A.hs:(9,22)-(9,25): [A.A] -> GHC.Internal.Show.ShowS
|
|
| 20 | 19 | a/A.hs:(11,10)-(11,15): B.Test A.A
|
| 21 | 20 | a/A.hs:(11,10)-(11,15): (A.A -> GHC.Internal.Base.String) -=> B.Test A.A
|
| 22 | 21 | a/A.hs:(11,10)-(11,15): A.A -> GHC.Internal.Base.String
|
| 22 | +a/A.hs:(12,3)-(12,6): A.A -> GHC.Internal.Base.String
|
|
| 23 | 23 | a/A.hs:(12,10)-(12,13): A.A -> GHC.Internal.Base.String
|
| 24 | 24 | b/B.hs:(3,1)-(3,3): GHC.Internal.Bignum.Integer.Integer
|
| 25 | -b/B.hs:(9,3)-(9,6): GHC.Internal.Types.Int -> GHC.Internal.Base.String
|
|
| 26 | 25 | b/B.hs:(3,7)-(3,8): GHC.Internal.Bignum.Integer.Integer
|
| 27 | 26 | b/B.hs:(8,10)-(8,17): B.Test GHC.Internal.Types.Int
|
| 28 | 27 | b/B.hs:(8,10)-(8,17): (GHC.Internal.Types.Int -> GHC.Internal.Base.String) -=> B.Test GHC.Internal.Types.Int
|
| 29 | 28 | b/B.hs:(8,10)-(8,17): GHC.Internal.Types.Int -> GHC.Internal.Base.String
|
| 29 | +b/B.hs:(9,3)-(9,6): GHC.Internal.Types.Int -> GHC.Internal.Base.String
|
|
| 30 | 30 | b/B.hs:(9,10)-(9,13): GHC.Internal.Types.Int -> GHC.Internal.Base.String
|
| 31 | -c/C.hs:(4,1)-(4,3): GHC.Internal.Bignum.Integer.Integer
|
|
| 32 | 31 | c/C.hs:(3,1)-(3,3): GHC.Internal.Bignum.Integer.Integer
|
| 33 | -c/C.hs:(4,7)-(4,7): GHC.Internal.Bignum.Integer.Integer
|
|
| 34 | 32 | c/C.hs:(3,7)-(3,7): GHC.Internal.Bignum.Integer.Integer
|
| 35 | -d/Main.hs:(5,1)-(5,4): GHC.Internal.Bignum.Integer.Integer
|
|
| 33 | +c/C.hs:(4,1)-(4,3): GHC.Internal.Bignum.Integer.Integer
|
|
| 34 | +c/C.hs:(4,7)-(4,7): GHC.Internal.Bignum.Integer.Integer
|
|
| 36 | 35 | d/Main.hs:(3,1)-(3,4): GHC.Internal.Types.IO ()
|
| 37 | -d/Main.hs:(5,8)-(5,8): GHC.Internal.Bignum.Integer.Integer
|
|
| 36 | +d/Main.hs:(3,1)-(3,4): GHC.Internal.Types.IO ()
|
|
| 37 | +d/Main.hs:(3,8)-(3,30): GHC.Internal.Types.IO ()
|
|
| 38 | 38 | d/Main.hs:(3,8)-(3,15): GHC.Internal.Base.String -> GHC.Internal.Types.IO ()
|
| 39 | 39 | d/Main.hs:(3,17)-(3,30): GHC.Internal.Base.String
|
| 40 | -d/Main.hs:(3,8)-(3,30): GHC.Internal.Types.IO ()
|
|
| 41 | -d/Main.hs:(3,1)-(3,4): GHC.Internal.Types.IO () |
|
| 40 | +d/Main.hs:(5,1)-(5,4): GHC.Internal.Bignum.Integer.Integer
|
|
| 41 | +d/Main.hs:(5,8)-(5,8): GHC.Internal.Bignum.Integer.Integer |
| ... | ... | @@ -7,12 +7,13 @@ |
| 7 | 7 | -- ^^^^
|
| 8 | 8 | :type-at T16575.hs 4 15 4 19
|
| 9 | 9 | -- wrongly outputs:
|
| 10 | --- :: [X] -> ShowS
|
|
| 10 | +-- :: Show X
|
|
| 11 | + |
|
| 11 | 12 | |
| 12 | 13 | -- instance Eq X where
|
| 13 | 14 | -- ^^^^
|
| 14 | 15 | :type-at T16575.hs 6 10 6 14
|
| 15 | 16 | -- wrongly outputs:
|
| 16 | --- :: X -> X -> Bool
|
|
| 17 | +-- :: Eq X
|
|
| 17 | 18 | |
| 18 | 19 | -- also note how :all-types is inconsistent with :type-at |
| 1 | 1 | Collecting type info for 1 module(s) ...
|
| 2 | -T16575.hs:(4,15)-(4,18): GHC.Internal.Types.Int -> Ghost.X -> GHC.Internal.Show.ShowS
|
|
| 3 | -T16575.hs:(4,15)-(4,18): Ghost.X -> GHC.Internal.Base.String
|
|
| 4 | -T16575.hs:(4,15)-(4,18): [Ghost.X] -> GHC.Internal.Show.ShowS
|
|
| 5 | -T16575.hs:(7,7)-(7,8): Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool
|
|
| 6 | -T16575.hs:(6,10)-(6,13): Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool
|
|
| 7 | 2 | T16575.hs:(4,15)-(4,18): GHC.Internal.Show.Show Ghost.X
|
| 8 | 3 | T16575.hs:(4,15)-(4,18): ([Ghost.X] -> GHC.Internal.Show.ShowS) -=> GHC.Internal.Show.Show Ghost.X
|
| 9 | 4 | T16575.hs:(4,15)-(4,18): (Ghost.X -> GHC.Internal.Base.String) -=> ([Ghost.X] -> GHC.Internal.Show.ShowS) -=> GHC.Internal.Show.Show Ghost.X
|
| ... | ... | @@ -11,19 +6,24 @@ T16575.hs:(4,15)-(4,18): (GHC.Internal.Types.Int -> Ghost.X -> GHC.Internal.Show |
| 11 | 6 | T16575.hs:(4,15)-(4,18): GHC.Internal.Types.Int -> Ghost.X -> GHC.Internal.Show.ShowS
|
| 12 | 7 | T16575.hs:(4,15)-(4,18): Ghost.X -> GHC.Internal.Base.String
|
| 13 | 8 | T16575.hs:(4,15)-(4,18): [Ghost.X] -> GHC.Internal.Show.ShowS
|
| 9 | +T16575.hs:(4,15)-(4,18): GHC.Internal.Types.Int -> Ghost.X -> GHC.Internal.Show.ShowS
|
|
| 10 | +T16575.hs:(4,15)-(4,18): Ghost.X -> GHC.Internal.Base.String
|
|
| 11 | +T16575.hs:(4,15)-(4,18): [Ghost.X] -> GHC.Internal.Show.ShowS
|
|
| 14 | 12 | T16575.hs:(6,10)-(6,13): GHC.Internal.Classes.Eq Ghost.X
|
| 15 | 13 | T16575.hs:(6,10)-(6,13): (Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool) -=> GHC.Internal.Classes.Eq Ghost.X
|
| 16 | 14 | T16575.hs:(6,10)-(6,13): (Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool) -=> (Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool) -=> GHC.Internal.Classes.Eq Ghost.X
|
| 17 | 15 | T16575.hs:(6,10)-(6,13): Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool
|
| 18 | 16 | T16575.hs:(6,10)-(6,13): Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool
|
| 19 | -T16575.hs:(7,14)-(7,17): GHC.Internal.Types.Bool
|
|
| 20 | -T16575.hs:(8,14)-(8,17): GHC.Internal.Types.Bool
|
|
| 21 | -T16575.hs:(9,14)-(9,18): GHC.Internal.Types.Bool
|
|
| 17 | +T16575.hs:(6,10)-(6,13): Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool
|
|
| 22 | 18 | T16575.hs:(7,5)-(7,5): Ghost.X
|
| 19 | +T16575.hs:(7,7)-(7,8): Ghost.X -> Ghost.X -> GHC.Internal.Types.Bool
|
|
| 23 | 20 | T16575.hs:(7,10)-(7,10): Ghost.X
|
| 21 | +T16575.hs:(7,14)-(7,17): GHC.Internal.Types.Bool
|
|
| 24 | 22 | T16575.hs:(8,5)-(8,5): Ghost.X
|
| 25 | 23 | T16575.hs:(8,10)-(8,10): Ghost.X
|
| 24 | +T16575.hs:(8,14)-(8,17): GHC.Internal.Types.Bool
|
|
| 26 | 25 | T16575.hs:(9,5)-(9,5): Ghost.X
|
| 27 | 26 | T16575.hs:(9,10)-(9,10): Ghost.X
|
| 28 | - :: [X] -> ShowS
|
|
| 29 | - :: X -> X -> Bool |
|
| 27 | +T16575.hs:(9,14)-(9,18): GHC.Internal.Types.Bool
|
|
| 28 | + :: Show X
|
|
| 29 | + :: Eq X |
| ... | ... | @@ -109,7 +109,7 @@ undefined :: forall a. GHC.Internal.Stack.Types.HasCallStack => a |
| 109 | 109 | % ^~~^
|
| 110 | 110 | > instance Monoid Test where
|
| 111 | 111 | % output:
|
| 112 | -undefined :: [Test] -> ShowS
|
|
| 112 | +undefined :: Show Test
|
|
| 113 | 113 | |
| 114 | 114 | % executing: ":uses T16804a.hs 5 6 5 9"
|
| 115 | 115 | % file snippet:
|
| ... | ... | @@ -178,7 +178,7 @@ undefined :: forall a. GHC.Internal.Stack.Types.HasCallStack => a |
| 178 | 178 | % ^~~~~~~~~~^
|
| 179 | 179 | > mempty = A
|
| 180 | 180 | % output:
|
| 181 | -undefined :: [Test] -> Test
|
|
| 181 | +undefined :: Monoid Test
|
|
| 182 | 182 | |
| 183 | 183 | % executing: ":type-at T16804a.hs 8 3 8 8 undefined"
|
| 184 | 184 | % file snippet:
|
| ... | ... | @@ -610,8 +610,8 @@ T16804a.hs:(28,5)-(28,6) |
| 610 | 610 | > B <> _ = B
|
| 611 | 611 | % output:
|
| 612 | 612 | T16804a.hs:(28,8)-(28,10)
|
| 613 | -T16804a.hs:(28,14)-(28,16)
|
|
| 614 | 613 | T16804a.hs:(28,8)-(28,10)
|
| 614 | +T16804a.hs:(28,14)-(28,16)
|
|
| 615 | 615 | |
| 616 | 616 | % executing: ":uses T16804a.hs 28 14 28 16"
|
| 617 | 617 | % file snippet:
|
| ... | ... | @@ -621,8 +621,8 @@ T16804a.hs:(28,8)-(28,10) |
| 621 | 621 | > B <> _ = B
|
| 622 | 622 | % output:
|
| 623 | 623 | T16804a.hs:(28,8)-(28,10)
|
| 624 | -T16804a.hs:(28,14)-(28,16)
|
|
| 625 | 624 | T16804a.hs:(28,8)-(28,10)
|
| 625 | +T16804a.hs:(28,14)-(28,16)
|
|
| 626 | 626 | |
| 627 | 627 | % executing: ":uses T16804a.hs 29 3 29 3"
|
| 628 | 628 | % file snippet:
|
| ... | ... | @@ -777,8 +777,8 @@ T16804c.hs:(6,1)-(6,1) |
| 777 | 777 | >
|
| 778 | 778 | % output:
|
| 779 | 779 | T16804c.hs:(9,12)-(9,14)
|
| 780 | -T16804c.hs:(9,33)-(9,35)
|
|
| 781 | 780 | T16804c.hs:(9,12)-(9,14)
|
| 781 | +T16804c.hs:(9,33)-(9,35)
|
|
| 782 | 782 | |
| 783 | 783 | % executing: ":uses T16804c.hs 9 31 9 31"
|
| 784 | 784 | % file snippet:
|
| ... | ... | @@ -798,8 +798,8 @@ T16804c.hs:(9,31)-(9,31) |
| 798 | 798 | >
|
| 799 | 799 | % output:
|
| 800 | 800 | T16804c.hs:(9,12)-(9,14)
|
| 801 | -T16804c.hs:(9,33)-(9,35)
|
|
| 802 | 801 | T16804c.hs:(9,12)-(9,14)
|
| 802 | +T16804c.hs:(9,33)-(9,35)
|
|
| 803 | 803 | |
| 804 | 804 | % executing: ":uses T16804c.hs 12 13 12 13"
|
| 805 | 805 | % file snippet:
|
| ... | ... | @@ -809,8 +809,8 @@ T16804c.hs:(9,12)-(9,14) |
| 809 | 809 | >
|
| 810 | 810 | % output:
|
| 811 | 811 | T16804c.hs:(12,13)-(12,13)
|
| 812 | -T16804c.hs:(12,32)-(12,32)
|
|
| 813 | 812 | T16804c.hs:(12,13)-(12,13)
|
| 813 | +T16804c.hs:(12,32)-(12,32)
|
|
| 814 | 814 | |
| 815 | 815 | % executing: ":uses T16804c.hs 12 32 12 32"
|
| 816 | 816 | % file snippet:
|
| ... | ... | @@ -820,8 +820,8 @@ T16804c.hs:(12,13)-(12,13) |
| 820 | 820 | >
|
| 821 | 821 | % output:
|
| 822 | 822 | T16804c.hs:(12,13)-(12,13)
|
| 823 | -T16804c.hs:(12,32)-(12,32)
|
|
| 824 | 823 | T16804c.hs:(12,13)-(12,13)
|
| 824 | +T16804c.hs:(12,32)-(12,32)
|
|
| 825 | 825 | |
| 826 | 826 | % executing: ":uses T16804c.hs 15 13 15 13"
|
| 827 | 827 | % file snippet:
|
| ... | ... | @@ -830,8 +830,8 @@ T16804c.hs:(12,13)-(12,13) |
| 830 | 830 | % ^
|
| 831 | 831 | % output:
|
| 832 | 832 | T16804c.hs:(15,13)-(15,13)
|
| 833 | -T16804c.hs:(15,30)-(15,30)
|
|
| 834 | 833 | T16804c.hs:(15,13)-(15,13)
|
| 834 | +T16804c.hs:(15,30)-(15,30)
|
|
| 835 | 835 | |
| 836 | 836 | % executing: ":uses T16804c.hs 15 30 15 30"
|
| 837 | 837 | % file snippet:
|
| ... | ... | @@ -840,5 +840,5 @@ T16804c.hs:(15,13)-(15,13) |
| 840 | 840 | % ^
|
| 841 | 841 | % output:
|
| 842 | 842 | T16804c.hs:(15,13)-(15,13)
|
| 843 | -T16804c.hs:(15,30)-(15,30)
|
|
| 844 | 843 | T16804c.hs:(15,13)-(15,13)
|
| 844 | +T16804c.hs:(15,30)-(15,30) |
| 1 | 1 | Collecting type info for 1 module(s) ...
|
| 2 | 2 | T20150.hs:(7,1)-(7,3): GHC.Internal.StaticPtr.StaticPtr GHC.Internal.Types.Int
|
| 3 | -T20150.hs:(7,14)-(7,14): GHC.Internal.Types.Int
|
|
| 4 | 3 | T20150.hs:(7,7)-(7,14): GHC.Internal.StaticPtr.StaticPtr GHC.Internal.Types.Int
|
| 4 | +T20150.hs:(7,14)-(7,14): GHC.Internal.Types.Int |
| 1 | +module T27412 where
|
|
| 2 | + |
|
| 3 | +foo :: IO ()
|
|
| 4 | +foo =
|
|
| 5 | + mapM_ (\(x, y) -> do
|
|
| 6 | + print x
|
|
| 7 | + print y)
|
|
| 8 | + [(True, False)] |
| 1 | +:set +c
|
|
| 2 | +:load T27412.hs
|
|
| 3 | +:type-at T27412.hs 5 3 7 14 |
| 1 | +Collecting type info for 1 module(s) ...
|
|
| 2 | + :: [(Bool, Bool)] -> IO () |
| ... | ... | @@ -385,6 +385,7 @@ test('ListTuplePunsPpr', normal, ghci_script, ['ListTuplePunsPpr.script']) |
| 385 | 385 | test('ListTuplePunsPprNoAbbrevTuple', [limit_stdout_lines(14)], ghci_script, ['ListTuplePunsPprNoAbbrevTuple.script'])
|
| 386 | 386 | test('T24459', normal, ghci_script, ['T24459.script'])
|
| 387 | 387 | test('T24632', normal, ghci_script, ['T24632.script'])
|
| 388 | +test('T27412', normal, ghci_script, ['T27412.script'])
|
|
| 388 | 389 | # bytecode backend doesn't support '-finfo-table-map' (#27039)
|
| 389 | 390 | test('bytecodeIPE',
|
| 390 | 391 | [ extra_hc_opts('-finfo-table-map')
|