GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2021-02-15T18:18:48Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/8487Debugger confuses variables2021-02-15T18:18:48Zedsko@edsko.netDebugger confuses variablesConsider the following example:
```
import Control.Exception
f = do
ma <- try $ evaluate a
case ma of
Right str -> return a
Left err -> return $ show (err :: SomeException)
where
a :: String
a = error "hi"
```
L...Consider the following example:
```
import Control.Exception
f = do
ma <- try $ evaluate a
case ma of
Right str -> return a
Left err -> return $ show (err :: SomeException)
where
a :: String
a = error "hi"
```
Load into ghci, set a breakpoint on the 5th line, then run f:
```
:break 5
f
```
You will get
```
Stopped at Ex.hs:(5,3)-(7,53)
_result :: IO String = _
a :: Either SomeException String = Left _
```
This doesn't make sense. `a` has type `String`; it is `ma` that has type `Either SomeException String`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Debugger confuses variables","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Consider the following example:\r\n\r\n{{{\r\nimport Control.Exception\r\n\r\nf = do\r\n ma <- try $ evaluate a\r\n case ma of\r\n Right str -> return a\r\n Left err -> return $ show (err :: SomeException)\r\n where\r\n a :: String\r\n a = error \"hi\"\r\n}}}\r\n\r\nLoad into ghci, set a breakpoint on the 5th line, then run f:\r\n\r\n{{{\r\n:break 5\r\nf\r\n}}}\r\n\r\nYou will get\r\n\r\n{{{\r\nStopped at Ex.hs:(5,3)-(7,53)\r\n_result :: IO String = _\r\na :: Either SomeException String = Left _\r\n}}}\r\n\r\nThis doesn't make sense. `a` has type `String`; it is `ma` that has type `Either SomeException String`.","type_of_failure":"OtherFailure","blocking":[]} -->Roland SennRoland Sennhttps://gitlab.haskell.org/ghc/ghc/-/issues/2950show breakpoint locations of breakpoints which were ignored during :force2021-02-15T18:18:48Zphercekshow breakpoint locations of breakpoints which were ignored during :forceExtend message "\*\*\* Ignoring breakpoint" (which is printed during :force evalutation) so that it contains basic information about the breakpoint ignored. Add at least the breakpoint number.
<details><summary>Trac metadata</summary>
...Extend message "\*\*\* Ignoring breakpoint" (which is printed during :force evalutation) so that it contains basic information about the breakpoint ignored. Add at least the breakpoint number.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.10.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"show breakpoint numbers of breakpoints which were ignored during :force","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.1","keywords":["debugger"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Extend message \"*** Ignoring breakpoint\" (which is printed during :force evalutation) so that it contains basic information about the breakpoint ignored. Add at least the breakpoint number.","type_of_failure":"OtherFailure","blocking":[]} -->9.0.1Roland SennRoland Sennhttps://gitlab.haskell.org/ghc/ghc/-/issues/1620ModBreaks.modBreaks_array not initialised2021-02-15T18:18:47ZguestModBreaks.modBreaks_array not initialisedSomehow the following came up:
- \*\* Exception: ModBreaks.modBreaks_array not initialised
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version ...Somehow the following came up:
- \*\* Exception: ModBreaks.modBreaks_array not initialised
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"Bug in debugger 6.7.20070817","status":"New","operating_system":"Unknown","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.7","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown","cc":[""],"type":"Bug","description":"Somehow the following came up:\r\n*** Exception: ModBreaks.modBreaks_array not initialised","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1Roland SennRoland Sennhttps://gitlab.haskell.org/ghc/ghc/-/issues/14828panic! when using :print on some functions with class constraints?2021-01-12T00:18:35Zjolpanic! when using :print on some functions with class constraints?These are the problematic ones I've found:
```
> :t foldl
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
> :print foldl
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.2 for x86_64-unknown-linux):
isUnliftedType
t1_...These are the problematic ones I've found:
```
> :t foldl
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
> :print foldl
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.2 for x86_64-unknown-linux):
isUnliftedType
t1_a1H7[rt] :: TYPE t_a1H6[rt]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
> :t fmap
fmap :: Functor f => (a -> b) -> f a -> f b
> :print fmap
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.2 for x86_64-unknown-linux):
isUnliftedType
t1_a1Hu[rt] :: TYPE t_a1Ht[rt]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
> :t return
return :: Monad m => a -> m a
> :print return
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.2 for x86_64-unknown-linux):
isUnliftedType
t1_a1Wt[rt] :: TYPE t_a1Ws[rt]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
> :t pure
pure :: Applicative f => a -> f a
> :print pure
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.2 for x86_64-unknown-linux):
isUnliftedType
t1_a1WP[rt] :: TYPE t_a1WO[rt]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
These that don't have constraints are fine:
```
> :print id
id = (_t1::a -> a)
> :print map
map = (_t2::(a1 -> b) -> [a1] -> [b])
> :print const
const = (_t3::a2 -> b1 -> a2)
```
This value and function created in the session are fine:
```
> let x :: Monad m => m (); x = return ()
Prelude|
> :p x
x = (_t5::Monad m1 => m1 ())
> let f :: Monad m => Int -> m Int; f n = return (n + 1)
Prelude|
> :p f
f = (_t6::Monad m2 => Int -> m2 Int)
```
mempty and mappend imported from Data.Monoid are fine:
```
> :m + Data.Monoid
> :p mempty
mempty = (_t7::Monoid a4 => a4)
> :p mappend
mappend = (_t8::Monoid a4 => a4 -> a4 -> a4)
```
foldl' and foldr imported from Data.List are not fine:
```
> :m + Data.List
> :p foldl'
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.2 for x86_64-unknown-linux):
isUnliftedType
t1_a6Qy[rt] :: TYPE t_a6Qx[rt]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
> :p Data.List.foldr
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.2 for x86_64-unknown-linux):
isUnliftedType
t2_a6RG[rt] :: TYPE t1_a6RF[rt]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
but `all` and `init` from that same module are fine:
```
> :p Data.List.all
all = (_t13::Foldable t1 => (a22 -> Bool) -> t1 a22 -> Bool)
> :p Data.List.init
init = (_t14::[a29] -> [a29])
```
So, in a given module, among functions with class constraints, some have the error and others don't. I haven't found a value that's not a function with the error, and I haven't found a function with no class constraints exhibit the error.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.2.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"panic! when using :print on some functions with class constraints?","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"These are the problematic ones I've found:\r\n\r\n{{{\r\n> :t foldl\r\nfoldl :: Foldable t => (b -> a -> b) -> b -> t a -> b\r\n> :print foldl\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.2.2 for x86_64-unknown-linux):\r\n\tisUnliftedType\r\n t1_a1H7[rt] :: TYPE t_a1H6[rt]\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable\r\n callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable\r\n pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n> :t fmap\r\nfmap :: Functor f => (a -> b) -> f a -> f b\r\n> :print fmap\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.2.2 for x86_64-unknown-linux):\r\n\tisUnliftedType\r\n t1_a1Hu[rt] :: TYPE t_a1Ht[rt]\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable\r\n callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable\r\n pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\n> :t return\r\nreturn :: Monad m => a -> m a\r\n> :print return\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.2.2 for x86_64-unknown-linux):\r\n\tisUnliftedType\r\n t1_a1Wt[rt] :: TYPE t_a1Ws[rt]\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable\r\n callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable\r\n pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\n> :t pure\r\npure :: Applicative f => a -> f a\r\n> :print pure\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.2.2 for x86_64-unknown-linux):\r\n\tisUnliftedType\r\n t1_a1WP[rt] :: TYPE t_a1WO[rt]\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable\r\n callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable\r\n pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\n}}}\r\n\r\nThese that don't have constraints are fine:\r\n\r\n{{{\r\n> :print id\r\nid = (_t1::a -> a)\r\n> :print map\r\nmap = (_t2::(a1 -> b) -> [a1] -> [b])\r\n> :print const\r\nconst = (_t3::a2 -> b1 -> a2)\r\n}}}\r\n\r\nThis value and function created in the session are fine:\r\n\r\n{{{\r\n> let x :: Monad m => m (); x = return ()\r\nPrelude| \r\n> :p x\r\nx = (_t5::Monad m1 => m1 ())\r\n> let f :: Monad m => Int -> m Int; f n = return (n + 1)\r\nPrelude| \r\n> :p f\r\nf = (_t6::Monad m2 => Int -> m2 Int)\r\n}}}\r\n\r\nmempty and mappend imported from Data.Monoid are fine:\r\n\r\n{{{\r\n> :m + Data.Monoid\r\n> :p mempty\r\nmempty = (_t7::Monoid a4 => a4)\r\n> :p mappend\r\nmappend = (_t8::Monoid a4 => a4 -> a4 -> a4)\r\n}}}\r\n\r\nfoldl' and foldr imported from Data.List are not fine:\r\n\r\n{{{\r\n> :m + Data.List\r\n> :p foldl'\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.2.2 for x86_64-unknown-linux):\r\n\tisUnliftedType\r\n t1_a6Qy[rt] :: TYPE t_a6Qx[rt]\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable\r\n callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable\r\n pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\n> :p Data.List.foldr\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.2.2 for x86_64-unknown-linux):\r\n\tisUnliftedType\r\n t2_a6RG[rt] :: TYPE t1_a6RF[rt]\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable\r\n callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable\r\n pprPanic, called at compiler/types/Type.hs:1952:10 in ghc:Type\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\n}}}\r\n\r\nbut `all` and `init` from that same module are fine:\r\n\r\n{{{\r\n> :p Data.List.all\r\nall = (_t13::Foldable t1 => (a22 -> Bool) -> t1 a22 -> Bool)\r\n> :p Data.List.init\r\ninit = (_t14::[a29] -> [a29])\r\n}}}\r\n\r\nSo, in a given module, among functions with class constraints, some have the error and others don't. I haven't found a value that's not a function with the error, and I haven't found a function with no class constraints exhibit the error.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/17989GHCi: Pressing Tab after `:break ` produces a lot of nonsense.2020-06-27T14:32:38ZRoland SennGHCi: Pressing Tab after `:break ` produces a lot of nonsense.## Summary
In GHCi, typing `:break<blank><Tab>` shows a lot of values that are not eligible for breakpoints .
## Steps to reproduce
1. Start GHCi.
2. Load a simple Main.hs file.
3. Type `:break ` (Note the blank after `:break`!).
4. P...## Summary
In GHCi, typing `:break<blank><Tab>` shows a lot of values that are not eligible for breakpoints .
## Steps to reproduce
1. Start GHCi.
2. Load a simple Main.hs file.
3. Type `:break ` (Note the blank after `:break`!).
4. Press the `Tab` key.
The generated output:
```
roland@goms:~/Projekte/ghctest$ ghci Main.hs
GHCi, version 8.8.1: https://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( Main.hs, interpreted )
Ok, one module loaded.
*Main> :break
Display all 513 possibilities? (y or n)
!! Prelude.Traversable Prelude.repeat fromRational
$ Prelude.True Prelude.replicate fst
$! Prelude.Word Prelude.return gcd
&& Prelude.^ Prelude.reverse getChar
* Prelude.^^ Prelude.round getContents
** Prelude.abs Prelude.scaleFloat getLine
<many many more lines>
```
However, using these values for breakpoints produces error messages:
```
*Main> :break Prelude.repeat
cannot set breakpoint on repeat: module GHC.List is not interpreted
*Main> :break fromRational
cannot set breakpoint on fromRational: module GHC.Real is not interpreted
```
## Expected behavior
Show only values eligible for breakpoints.
## Environment
* GHC version used: 7.10.3 - 8.8.1Roland SennRoland Sennhttps://gitlab.haskell.org/ghc/ghc/-/issues/2215:disable command to disable breakpoints2019-12-02T19:58:46ZSamuel Bronson:disable command to disable breakpointsOkay, I've finally gotten around to trying the debugger, and I noticed that there don't seem to be any commands to disable or reenable breakpoints. These would be really nice, and probably not too difficult. The names should be `:disable...Okay, I've finally gotten around to trying the debugger, and I noticed that there don't seem to be any commands to disable or reenable breakpoints. These would be really nice, and probably not too difficult. The names should be `:disable`and `:enable`. (That's what I expected them to be.)
Man, I wish there was a severity between "normal" and "major"...
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.9 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | SamB |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":":disable command to disable breakpoints","status":"New","operating_system":"Unknown","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.9","keywords":["debugger","ghci"],"differentials":[],"test_case":"","architecture":"Unknown","cc":["SamB"],"type":"FeatureRequest","description":"Okay, I've finally gotten around to trying the debugger, and I noticed that there don't seem to be any commands to disable or reenable breakpoints. These would be really nice, and probably not too difficult. The names should be {{{:disable}}}and {{{:enable}}}. (That's what I expected them to be.)\r\n\r\nMan, I wish there was a severity between \"normal\" and \"major\"...","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1Roland SennRoland Sennhttps://gitlab.haskell.org/ghc/ghc/-/issues/17431:force of multiple values results in ASSERT failed! file compiler/types/TyCoS...2019-11-22T12:02:23ZRoland Senn:force of multiple values results in ASSERT failed! file compiler/types/TyCoSubst.hs, line 384## Summary
With GHC Head `8.9.0.20191103` when I force multiple values in a single `:force` command, I get an `ASSERT failed! file compiler/types/TyCoSubst.hs, line 384`. It works, when I do multiple `:force` commands, each one with onl...## Summary
With GHC Head `8.9.0.20191103` when I force multiple values in a single `:force` command, I get an `ASSERT failed! file compiler/types/TyCoSubst.hs, line 384`. It works, when I do multiple `:force` commands, each one with only a single value
## Steps to reproduce
Use program Sort.hs:
~~~
module Sort (sort) where
sort :: Ord a => [a] -> [a]
sort [] = []
sort (x:xs) = insert x (sort xs)
insert :: Ord a => a -> [a] -> [a]
insert x [] = [x]
insert x (y:ys) | x < y = x:y:ys
| otherwise = y:(insert x ys)
~~~
In GHCi run the commands from the following session:
~~~
GHCi, version 8.9.0.20191103: https://www.haskell.org/ghc/ :? for help
Prelude> :l Sort
[1 of 1] Compiling Sort ( Sort.hs, interpreted )
Ok, one module loaded.
*Sort> :br 5
Breakpoint 0 activated at Sort.hs:5:15-32
*Sort> sort [3,2,1]
Stopped in Sort.sort, Sort.hs:5:15-32
_result :: [a] = _
x :: a = _
xs :: [a] = [_,_]
[Sort.hs:5:15-32] *Sort> :force x xs _result
*** Exception: ASSERT failed! file compiler/types/TyCoSubst.hs, line 384
~~~
## Expected behavior
Similar result as when I send 3 :force commands with only one value
~~~
GHCi, version 8.9.0.20191103: https://www.haskell.org/ghc/ :? for help
Prelude> :l Sort.hs
[1 of 1] Compiling Sort ( Sort.hs, interpreted )
Ok, one module loaded.
*Sort> :br 5
Breakpoint 0 activated at Sort.hs:5:15-32
*Sort> sort [3,2,1]
Stopped in Sort.sort, Sort.hs:5:15-32
_result :: [a] = _
x :: a = _
xs :: [a] = [_,_]
[Sort.hs:5:15-32] *Sort> :force x
x = 3
[Sort.hs:5:15-32] *Sort> :force xs
xs = [2,1]
[Sort.hs:5:15-32] *Sort> :force _result
*** Ignoring breakpoint
*** Ignoring breakpoint
*** Ignoring breakpoint
_result = [1,2,3]
[Sort.hs:5:15-32] *Sort>
~~~
## Environment
* GHC version used: 8.9.0.20191103 branch master (without local changes!)
Optional:
* Operating System: Debian 9
* System Architecture: x86_64https://gitlab.haskell.org/ghc/ghc/-/issues/14690:steplocal panics after break-on-error2019-11-03T17:56:26ZPhilonous:steplocal panics after break-on-errorUsing steplocal after breaking on an exception leads to GHCI giving a pattern match error
Minimal testcase:
```
Prelude> :set -fbreak-on-exception
Prelude> error "abc"
Stopped in <exception thrown>, <unknown>
_exception :: e = _
[<unkn...Using steplocal after breaking on an exception leads to GHCI giving a pattern match error
Minimal testcase:
```
Prelude> :set -fbreak-on-exception
Prelude> error "abc"
Stopped in <exception thrown>, <unknown>
_exception :: e = _
[<unknown>] [<unknown>] Prelude> :steplocal
*** Exception: Pattern match failure in do expression at ghc/GHCi/UI.hs:3149:12-18
```
:step works as expected.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.2.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Pattern match failure in GHCi with :steplocal","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Using steplocal after breaking on an exception leads to GHCI giving a pattern match error\r\n\r\nMinimal testcase:\r\n\r\n\r\n{{{\r\nPrelude> :set -fbreak-on-exception\r\nPrelude> error \"abc\"\r\nStopped in <exception thrown>, <unknown>\r\n_exception :: e = _\r\n[<unknown>] [<unknown>] Prelude> :steplocal\r\n*** Exception: Pattern match failure in do expression at ghc/GHCi/UI.hs:3149:12-18\r\n}}}\r\n\r\n:step works as expected.","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1Roland SennRoland Sennhttps://gitlab.haskell.org/ghc/ghc/-/issues/1162:quit doesn't always quit GHCi when stopped at a breakpoint2019-07-07T19:15:01Zmnislaih:quit doesn't always quit GHCi when stopped at a breakpointThe mechanism for GHCi inferior sessions used by the debugger is a bit weak, in that it uses a exception StopParentSession to signal the desire to exit from GHCi to the top session. If the enclosing context at which the breakpoint is sto...The mechanism for GHCi inferior sessions used by the debugger is a bit weak, in that it uses a exception StopParentSession to signal the desire to exit from GHCi to the top session. If the enclosing context at which the breakpoint is stopped is wrapped by an exception handler, that handler could capture the exception and as a result GHCi does not exit but return to the top level session instead.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | lowest |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":":quit doesn't always quit GHCi when stopped at a breakpoint","status":"New","operating_system":"Unknown","component":"GHCi","related":[],"milestone":"6.8 branch","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.7","keywords":["debugger","ghci"],"differentials":[],"test_case":"","architecture":"Unknown","cc":[""],"type":"Bug","description":"The mechanism for GHCi inferior sessions used by the debugger is a bit weak, in that it uses a exception StopParentSession to signal the desire to exit from GHCi to the top session. If the enclosing context at which the breakpoint is stopped is wrapped by an exception handler, that handler could capture the exception and as a result GHCi does not exit but return to the top level session instead.","type_of_failure":"OtherFailure","blocking":[]} -->6.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/1429:list gets confused by bang patterns in .lhs files2019-07-07T19:13:35Zmnislaih:list gets confused by bang patterns in .lhs filesA bang pattern in a .lhs file confuses :list by one lineA bang pattern in a .lhs file confuses :list by one line6.8.3Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/1681:abandon in an exception breakpoint can lead ghci to freeze later2019-07-07T19:12:10Zmnislaih:abandon in an exception breakpoint can lead ghci to freeze laterAn example:
```
Prelude> :set -fbreak-on-exception
Prelude> error "an error"
Stopped at <exception thrown>
_exception :: e = GHC.IOBase.ErrorCall ('a' : _)
unable to list source for <exception thrown>
[<exception thrown>] Prelude> :aban...An example:
```
Prelude> :set -fbreak-on-exception
Prelude> error "an error"
Stopped at <exception thrown>
_exception :: e = GHC.IOBase.ErrorCall ('a' : _)
unable to list source for <exception thrown>
[<exception thrown>] Prelude> :abandon
Prelude> () -- whatever we do here, ghci freezes
()
...
...
^CInterrupted.
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------ |
| Version | 6.8 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | mnislaih@gmail.com |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":":abandon in an exception breakpoint can lead ghci to freeze later","status":"New","operating_system":"Unknown","component":"GHCi","related":[],"milestone":"6.8 branch","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"simonmarhaskell@gmail.com"},"version":"6.8","keywords":["debugger"],"differentials":[],"test_case":"","architecture":"Unknown","cc":["mnislaih@gmail.com"],"type":"Bug","description":"An example:\r\n{{{\r\nPrelude> :set -fbreak-on-exception\r\nPrelude> error \"an error\"\r\nStopped at <exception thrown>\r\n_exception :: e = GHC.IOBase.ErrorCall ('a' : _)\r\nunable to list source for <exception thrown>\r\n[<exception thrown>] Prelude> :abandon\r\nPrelude> () -- whatever we do here, ghci freezes\r\n()\r\n...\r\n...\r\n^CInterrupted.\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.8.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/2740free variable not available in debugger2019-07-07T19:07:05Zphercekfree variable not available in debuggerThe attached test shows the bugs. Unpack and check the ghci_log.html file to see how to reproduce them. Stderr is in red, selected expression is underlined. Looks like these error messages should not be there:
Not in scope: `mSnd'
Not ...The attached test shows the bugs. Unpack and check the ghci_log.html file to see how to reproduce them. Stderr is in red, selected expression is underlined. Looks like these error messages should not be there:
Not in scope: `mSnd'
Not in scope: `a'
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"free variable not available in debugger, field selection function not available in debugger","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.8.2","keywords":["debugger"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The attached test shows the bugs. Unpack and check the ghci_log.html file to see how to reproduce them. Stderr is in red, selected expression is underlined. Looks like these error messages should not be there:\r\n\r\nNot in scope: `mSnd'\r\n\r\nNot in scope: `a'","type_of_failure":"OtherFailure","blocking":[]} -->6.10.2Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3035:steplocal and :stepmodule should not polute trace history2019-07-07T19:05:47Zphercek:steplocal and :stepmodule should not polute trace history:steplocal and :stepmodule should not extend trace history with records which represent breakpoints outside the scopes in which :steplocal and :stepmodule are actually stopping.
For some discussion related to this see
http://www.haskell...:steplocal and :stepmodule should not extend trace history with records which represent breakpoints outside the scopes in which :steplocal and :stepmodule are actually stopping.
For some discussion related to this see
http://www.haskell.org/pipermail/glasgow-haskell-users/2009-February/016576.html
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":":steplocal and :stepmodule should not polute trace history","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.1","keywords":["debugger"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":":steplocal and :stepmodule should not extend trace history with records which represent breakpoints outside the scopes in which :steplocal and :stepmodule are actually stopping.\r\n\r\nFor some discussion related to this see\r\nhttp://www.haskell.org/pipermail/glasgow-haskell-users/2009-February/016576.html","type_of_failure":"OtherFailure","blocking":[]} -->Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3229queued GHCi commands are not resume context specific2019-07-07T19:04:48Zphercekqueued GHCi commands are not resume context specificI think it is a bug that the second part (`:continue`) of the command `:cmd return "rv\n:continue"` is executed in a different context than the first part (rv (request for the value of rv variable)). Notice that we did not stop at breakp...I think it is a bug that the second part (`:continue`) of the command `:cmd return "rv\n:continue"` is executed in a different context than the first part (rv (request for the value of rv variable)). Notice that we did not stop at breakpoint 1 (line 7). Well, the stop happened but it continued immediately because of queued `:continue` command. But the command was queued in the context of breakpoint 0 and not breakpoint 1.
```
status:0 peter@metod [716] ~/tmp
% grep -n '^' b.hs
1:fn :: Int -> Int
2:fn x =
3: let rv = add x 1 in
4: rv
5:
6:add :: Int -> Int -> Int
7:add a b = a + b
status:0 peter@metod [717] ~/tmp
% ghci b.hs
GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main ( b.hs, interpreted )
Ok, modules loaded: Main.
*Main> :set stop :list
*Main> :break 4
Breakpoint 0 activated at b.hs:4:2-3
*Main> :break 7
Breakpoint 1 activated at b.hs:7:0-14
*Main> fn 100
Stopped at b.hs:4:2-3
_result :: Int = _
rv :: Int = _
3 let rv = add x 1 in
4 rv
5
[b.hs:4:2-3] *Main> :cmd return "rv\n:continue"
Stopped at b.hs:7:0-14
_result :: Int = _
6 add :: Int -> Int -> Int
7 add a b = a + b
8
101
[b.hs:4:2-3] *Main> :continue
101
*Main> :q
Leaving GHCi.
status:0 peter@metod [718] ~/tmp
%
```
The log was done with 6.10.1 but it is the same with 6.10.3.\[\[BR\]\]
I posted about this to the ghc users list about 2 months ago but nobody responded. My guess is nobody minds either way since nobody scripts breakpoints. At least it would be fine to know whether a patch fixing this has a chance to be accepted.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"queued GHCi commands are not resume context specific","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.3","keywords":["debugger"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I think it is a bug that the second part ({{{:continue}}}) of the command {{{:cmd return \"rv\\n:continue\"}}} is executed in a different context than the first part (rv (request for the value of rv variable)). Notice that we did not stop at breakpoint 1 (line 7). Well, the stop happened but it continued immediately because of queued {{{:continue}}} command. But the command was queued in the context of breakpoint 0 and not breakpoint 1.\r\n{{{\r\nstatus:0 peter@metod [716] ~/tmp\r\n% grep -n '^' b.hs\r\n1:fn :: Int -> Int\r\n2:fn x =\r\n3: let rv = add x 1 in\r\n4: rv\r\n5:\r\n6:add :: Int -> Int -> Int\r\n7:add a b = a + b\r\nstatus:0 peter@metod [717] ~/tmp\r\n% ghci b.hs \r\nGHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help\r\nLoading package ghc-prim ... linking ... done.\r\nLoading package integer ... linking ... done.\r\nLoading package base ... linking ... done.\r\n[1 of 1] Compiling Main ( b.hs, interpreted )\r\nOk, modules loaded: Main.\r\n*Main> :set stop :list\r\n*Main> :break 4\r\nBreakpoint 0 activated at b.hs:4:2-3\r\n*Main> :break 7\r\nBreakpoint 1 activated at b.hs:7:0-14\r\n*Main> fn 100\r\nStopped at b.hs:4:2-3\r\n_result :: Int = _\r\nrv :: Int = _\r\n3 let rv = add x 1 in\r\n4 rv\r\n5 \r\n[b.hs:4:2-3] *Main> :cmd return \"rv\\n:continue\"\r\nStopped at b.hs:7:0-14\r\n_result :: Int = _\r\n6 add :: Int -> Int -> Int\r\n7 add a b = a + b\r\n8 \r\n101\r\n[b.hs:4:2-3] *Main> :continue\r\n101\r\n*Main> :q\r\nLeaving GHCi.\r\nstatus:0 peter@metod [718] ~/tmp\r\n% \r\n}}}\r\nThe log was done with 6.10.1 but it is the same with 6.10.3.[[BR]]\r\nI posted about this to the ghc users list about 2 months ago but nobody responded. My guess is nobody minds either way since nobody scripts breakpoints. At least it would be fine to know whether a patch fixing this has a chance to be accepted.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/14950GHC 8.2.2: GHCi duplicates breakpoint range prompt2019-07-07T18:14:55ZlierdakilGHC 8.2.2: GHCi duplicates breakpoint range promptI think breakpoint range is being printed twice, once as part of prompt, and the second time by itself.
To reproduce, create `test.hs` file like this:
```hs
module Test where
test :: IO ()
test = putStrLn "Hello, World!"
```
Then run...I think breakpoint range is being printed twice, once as part of prompt, and the second time by itself.
To reproduce, create `test.hs` file like this:
```hs
module Test where
test :: IO ()
test = putStrLn "Hello, World!"
```
Then run the following GHCi session:
```
$ ghci test.hs
GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Test ( test.hs, interpreted )
Ok, one module loaded.
*Test> :break test
Breakpoint 0 activated at test.hs:4:8-31
*Test> :trace test
Stopped in Test.test, test.hs:4:8-31
_result :: IO () = _
[test.hs:4:8-31] [test.hs:4:8-31] *Test> :set prompt ""
[test.hs:4:8-31]
```
Notice `[test.hs:4:8-31]` is printed twice, and is even printed when prompt is set to `""`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.2.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC 8.2.2: GHCi duplicates breakpoint range prompt","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I think breakpoint range is being printed twice, once as part of prompt, and the second time by itself.\r\n\r\nTo reproduce, create `test.hs` file like this:\r\n\r\n{{{#!hs\r\nmodule Test where\r\n\r\ntest :: IO ()\r\ntest = putStrLn \"Hello, World!\"\r\n}}}\r\n\r\nThen run the following GHCi session:\r\n{{{\r\n$ ghci test.hs\r\nGHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help\r\n[1 of 1] Compiling Test ( test.hs, interpreted )\r\nOk, one module loaded.\r\n*Test> :break test\r\nBreakpoint 0 activated at test.hs:4:8-31\r\n*Test> :trace test\r\nStopped in Test.test, test.hs:4:8-31\r\n_result :: IO () = _\r\n[test.hs:4:8-31] [test.hs:4:8-31] *Test> :set prompt \"\"\r\n[test.hs:4:8-31]\r\n}}}\r\n\r\nNotice `[test.hs:4:8-31]` is printed twice, and is even printed when prompt is set to `\"\"`.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/14973Location in GHCi debugger prompt printed twice when default prompt is used2019-07-07T18:14:50ZÖmer Sinan AğacanLocation in GHCi debugger prompt printed twice when default prompt is used(Noticed in #8316)
Test.hs:
```haskell
foo :: [Int]
foo = [ 1 .. 10 ]
```
Reproducer:
```
$ ghc-stage2 --interactive -ignore-dot-ghci Test.hs
GHCi, version 8.5.20180325: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Mai...(Noticed in #8316)
Test.hs:
```haskell
foo :: [Int]
foo = [ 1 .. 10 ]
```
Reproducer:
```
$ ghc-stage2 --interactive -ignore-dot-ghci Test.hs
GHCi, version 8.5.20180325: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( Test.hs, interpreted )
Ok, one module loaded.
*Main> :break foo
Breakpoint 0 activated at Test.hs:2:7-14
*Main> foo
Stopped in Main.foo, Test.hs:2:7-14
_result :: [Int] = _
[Test.hs:2:7-14] [Test.hs:2:7-14] *Main>
```
The `[Test.hs:2:7-14]` part is repeated. Setting the prompt fixes it:
```
$ ghc-stage2 --interactive Test.hs -ignore-dot-ghci
GHCi, version 8.5.20180325: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( Test.hs, interpreted )
Ok, one module loaded.
*Main> :set prompt "> "
> :break foo
Breakpoint 0 activated at Test.hs:2:7-14
> foo
Stopped in Main.foo, Test.hs:2:7-14
_result :: [Int] = _
[Test.hs:2:7-14] >
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.5 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Location in GHCi debugger prompt printed twice when default prompt is used","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.5","keywords":["debugger"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"(Noticed in #8316)\r\n\r\nTest.hs:\r\n\r\n{{{#!haskell\r\nfoo :: [Int]\r\nfoo = [ 1 .. 10 ]\r\n}}}\r\n\r\nReproducer:\r\n\r\n{{{\r\n$ ghc-stage2 --interactive -ignore-dot-ghci Test.hs\r\nGHCi, version 8.5.20180325: http://www.haskell.org/ghc/ :? for help\r\n[1 of 1] Compiling Main ( Test.hs, interpreted )\r\nOk, one module loaded.\r\n*Main> :break foo\r\nBreakpoint 0 activated at Test.hs:2:7-14\r\n*Main> foo\r\nStopped in Main.foo, Test.hs:2:7-14\r\n_result :: [Int] = _\r\n[Test.hs:2:7-14] [Test.hs:2:7-14] *Main>\r\n}}}\r\n\r\nThe `[Test.hs:2:7-14]` part is repeated. Setting the prompt fixes it:\r\n\r\n{{{\r\n$ ghc-stage2 --interactive Test.hs -ignore-dot-ghci\r\nGHCi, version 8.5.20180325: http://www.haskell.org/ghc/ :? for help\r\n[1 of 1] Compiling Main ( Test.hs, interpreted )\r\nOk, one module loaded.\r\n*Main> :set prompt \"> \"\r\n> :break foo\r\nBreakpoint 0 activated at Test.hs:2:7-14\r\n> foo\r\nStopped in Main.foo, Test.hs:2:7-14\r\n_result :: [Int] = _\r\n[Test.hs:2:7-14] >\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/16529ghci debugger test break006 fails with a panic2019-07-07T18:00:08ZÖmer Sinan Ağacanghci debugger test break006 fails with a panicMinimal reproducer:
```
$ ghc-stage2 --interactive
GHCi, version 8.9.20190403: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/omer/rcbackup/.ghci
λ:1> :l Test3.hs
[1 of 1] Compiling Main ( Tes...Minimal reproducer:
```
$ ghc-stage2 --interactive
GHCi, version 8.9.20190403: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/omer/rcbackup/.ghci
λ:1> :l Test3.hs
[1 of 1] Compiling Main ( Test3.hs, interpreted )
Ok, one module loaded.
λ:2> :st mymap (+1) [1::Int,2,3]
Stopped in Main.mymap, Test3.hs:2:18-31
_result :: [a] = _
f :: Int -> a = _
x :: Int = 1
xs :: [Int] = [2,3]
[Test3.hs:2:18-31] λ:3> let y = f x
<interactive>: panic! (the 'impossible' happened)
(GHC version 8.9.20190403 for x86_64-unknown-linux):
ASSERT failed!
in_scope InScope {wild_00}
tenv [10 :-> 'LiftedRep, 11 :-> 'LiftedRep, 12 :-> a_I2nn[rt],
13 :-> ()]
tenvFVs {a_I2nn[rt]}
cenv []
cenvFVs {}
tys [a_12]
cos []
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1169:37 in ghc:Outputable
pprPanic, called at compiler/utils/Outputable.hs:1230:5 in ghc:Outputable
assertPprPanic, called at compiler/types/TyCoRep.hs:3199:56 in ghc:TyCoRep
checkValidSubst, called at compiler/types/TyCoRep.hs:3230:29 in ghc:TyCoRep
substTy, called at compiler/types/OptCoercion.hs:121:27 in ghc:OptCoercion
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
```
`Test3.hs` is in `testsuite/tests/ghci.debugger`.
We should be running these tests on CI.
Not sure what weight to give to this ticket: it's a compile-time crash, but I doubt anyone uses GHCi debugger or came across this bug before. So assigning 3 for now.https://gitlab.haskell.org/ghc/ghc/-/issues/16915:sprint says an evaluated thing ain't evaluated yet2019-07-07T06:23:40ZDaniel Wagner:sprint says an evaluated thing ain't evaluated yetThis ghci behavior (produced by ghci-8.6.5) seems weird to me:
> x = ()
> x `seq` ()
()
> :sprint x
x = _
I would expect `x = ()` on the last line.This ghci behavior (produced by ghci-8.6.5) seems weird to me:
> x = ()
> x `seq` ()
()
> :sprint x
x = _
I would expect `x = ()` on the last line.