[GHC] #14371: ghc: panic! when reloading file with code

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Hello, I have no idea what causes it (maybe my mistake) so I probably will give you more code then necessaty. Sorry for that. \\ **I had working code:** {{{ f :: [[Bool]] -> ([Bool], [[Bool]]) f [] = ([True], g []) f (x:xs) = (g x, g xs) g :: [a] -> [a] g [] = [] g x = x listITE :: [Bool] -> [a] -> [a] -> [a] listITE [] _ _ = [] listITE _ _ [] = [] listITE _ [] _ = [] listITE (b:bs) (x:xs) (y:ys) = [(if b then x else y)] ++ listITE bs xs ys --zipWith (\x,y -> if ) ; firstMatch :: (a -> a -> Bool) -> [a] -> a -> a firstMatch _ [] y = y firstMatch p (x:s) y = if index >= (length (x:s)) then y else (x:s) !! index where index = indexOf True (zipWith p (x:s) s) indexOf :: (Eq a) => a -> [a] -> Int indexOf _ [] = 10 indexOf c (x:s) = if c==x then 0 else 1 + indexOf c s }}} that I could load, run and reload. \\ ** After I wrote this and tried to reload:** {{{ countInversions :: (Ord a) => [a] -> Int countInversions [] = 0 countInversions (x:s) = (countSame (True==) (map (x>) s)) + countInversions s countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s }}} \\ **I get error:** ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ I hope I found u a bug :) \\ Have a nice day -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
I have no idea what causes it (maybe my mistake) so I probably will give you more code then necessaty. Sorry for that. \\ **I had working code:**
{{{ f :: [[Bool]] -> ([Bool], [[Bool]]) f [] = ([True], g []) f (x:xs) = (g x, g xs)
g :: [a] -> [a] g [] = [] g x = x
listITE :: [Bool] -> [a] -> [a] -> [a] listITE [] _ _ = [] listITE _ _ [] = [] listITE _ [] _ = [] listITE (b:bs) (x:xs) (y:ys) = [(if b then x else y)] ++ listITE bs xs ys --zipWith (\x,y -> if ) ;
firstMatch :: (a -> a -> Bool) -> [a] -> a -> a firstMatch _ [] y = y firstMatch p (x:s) y = if index >= (length (x:s)) then y else (x:s) !! index where index = indexOf True (zipWith p (x:s) s)
indexOf :: (Eq a) => a -> [a] -> Int indexOf _ [] = 10 indexOf c (x:s) = if c==x then 0 else 1 + indexOf c s }}} that I could load, run and reload. \\
** After I wrote this and tried to reload:** {{{ countInversions :: (Ord a) => [a] -> Int countInversions [] = 0 countInversions (x:s) = (countSame (True==) (map (x>) s)) + countInversions s
countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s
}}} \\
**I get error:** ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\
I hope I found u a bug :) \\
Have a nice day
New description: Hello, I have no idea what causes it (maybe my mistake) so I probably will give you more code then necessaty. Sorry for that. \\ **I had working code:** {{{ f :: [[Bool]] -> ([Bool], [[Bool]]) f [] = ([True], g []) f (x:xs) = (g x, g xs) g :: [a] -> [a] g [] = [] g x = x listITE :: [Bool] -> [a] -> [a] -> [a] listITE [] _ _ = [] listITE _ _ [] = [] listITE _ [] _ = [] listITE (b:bs) (x:xs) (y:ys) = [(if b then x else y)] ++ listITE bs xs ys --zipWith (\x,y -> if ) ; firstMatch :: (a -> a -> Bool) -> [a] -> a -> a firstMatch _ [] y = y firstMatch p (x:s) y = if index >= (length (x:s)) then y else (x:s) !! index where index = indexOf True (zipWith p (x:s) s) indexOf :: (Eq a) => a -> [a] -> Int indexOf _ [] = 10 indexOf c (x:s) = if c==x then 0 else 1 + indexOf c s }}} that I could load, run and reload. \\ ** After I wrote this and tried to reload:** {{{ countInversions :: (Ord a) => [a] -> Int countInversions [] = 0 countInversions (x:s) = (countSame (True==) (map (x>) s)) + countInversions s countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s }}} \\ **I get error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ Now I cannot reaload or even load this file \\ I hope I found u a bug :) \\ Have a nice day -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
I have no idea what causes it (maybe my mistake) so I probably will give you more code then necessaty. Sorry for that. \\ **I had working code:**
{{{ f :: [[Bool]] -> ([Bool], [[Bool]]) f [] = ([True], g []) f (x:xs) = (g x, g xs)
g :: [a] -> [a] g [] = [] g x = x
listITE :: [Bool] -> [a] -> [a] -> [a] listITE [] _ _ = [] listITE _ _ [] = [] listITE _ [] _ = [] listITE (b:bs) (x:xs) (y:ys) = [(if b then x else y)] ++ listITE bs xs ys --zipWith (\x,y -> if ) ;
firstMatch :: (a -> a -> Bool) -> [a] -> a -> a firstMatch _ [] y = y firstMatch p (x:s) y = if index >= (length (x:s)) then y else (x:s) !! index where index = indexOf True (zipWith p (x:s) s)
indexOf :: (Eq a) => a -> [a] -> Int indexOf _ [] = 10 indexOf c (x:s) = if c==x then 0 else 1 + indexOf c s }}} that I could load, run and reload. \\
** After I wrote this and tried to reload:** {{{ countInversions :: (Ord a) => [a] -> Int countInversions [] = 0 countInversions (x:s) = (countSame (True==) (map (x>) s)) + countInversions s
countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s
}}} \\
**I get error:**\\
''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ Now I cannot reaload or even load this file \\
I hope I found u a bug :) \\
Have a nice day
New description: Hello, I have no idea what causes it (maybe my mistake) so I probably will give you more code then necessaty. Sorry for that. \\ **I had working code:** {{{ f :: [[Bool]] -> ([Bool], [[Bool]]) f [] = ([True], g []) f (x:xs) = (g x, g xs) g :: [a] -> [a] g [] = [] g x = x listITE :: [Bool] -> [a] -> [a] -> [a] listITE [] _ _ = [] listITE _ _ [] = [] listITE _ [] _ = [] listITE (b:bs) (x:xs) (y:ys) = [(if b then x else y)] ++ listITE bs xs ys --zipWith (\x,y -> if ) ; firstMatch :: (a -> a -> Bool) -> [a] -> a -> a firstMatch _ [] y = y firstMatch p (x:s) y = if index >= (length (x:s)) then y else (x:s) !! index where index = indexOf True (zipWith p (x:s) s) indexOf :: (Eq a) => a -> [a] -> Int indexOf _ [] = 10 indexOf c (x:s) = if c==x then 0 else 1 + indexOf c s }}} that I could load, run and reload. \\ ** After I wrote this and tried to reload:** {{{ countInversions :: (Ord a) => [a] -> Int countInversions [] = 0 countInversions (x:s) = (countSame (True==) (map (x>) s)) + countInversions s countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s }}} \\ **I get error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ Now I cannot reaload or even load this file (but when I remove the added part, everything is OK) \\ I hope I found u a bug :) \\ Have a nice day ps. with my playing I discover that == **THIS GIVES THE ERROR** \\ {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
I have no idea what causes it (maybe my mistake) so I probably will give you more code then necessaty. Sorry for that. \\ **I had working code:**
{{{ f :: [[Bool]] -> ([Bool], [[Bool]]) f [] = ([True], g []) f (x:xs) = (g x, g xs)
g :: [a] -> [a] g [] = [] g x = x
listITE :: [Bool] -> [a] -> [a] -> [a] listITE [] _ _ = [] listITE _ _ [] = [] listITE _ [] _ = [] listITE (b:bs) (x:xs) (y:ys) = [(if b then x else y)] ++ listITE bs xs ys --zipWith (\x,y -> if ) ;
firstMatch :: (a -> a -> Bool) -> [a] -> a -> a firstMatch _ [] y = y firstMatch p (x:s) y = if index >= (length (x:s)) then y else (x:s) !! index where index = indexOf True (zipWith p (x:s) s)
indexOf :: (Eq a) => a -> [a] -> Int indexOf _ [] = 10 indexOf c (x:s) = if c==x then 0 else 1 + indexOf c s }}} that I could load, run and reload. \\
** After I wrote this and tried to reload:** {{{ countInversions :: (Ord a) => [a] -> Int countInversions [] = 0 countInversions (x:s) = (countSame (True==) (map (x>) s)) + countInversions s
countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s
}}} \\
**I get error:**\\
''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ Now I cannot reaload or even load this file (but when I remove the added part, everything is OK) \\
I hope I found u a bug :) \\
Have a nice day
ps. with my playing I discover that
== **THIS GIVES THE ERROR** \\
{{{
countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s }}}
New description: Hello, I have no idea what causes it (maybe my mistake) so I probably will give you more code then necessaty. Sorry for that. \\ **I had working code:** {{{ f :: [[Bool]] -> ([Bool], [[Bool]]) f [] = ([True], g []) f (x:xs) = (g x, g xs) g :: [a] -> [a] g [] = [] g x = x listITE :: [Bool] -> [a] -> [a] -> [a] listITE [] _ _ = [] listITE _ _ [] = [] listITE _ [] _ = [] listITE (b:bs) (x:xs) (y:ys) = [(if b then x else y)] ++ listITE bs xs ys --zipWith (\x,y -> if ) ; firstMatch :: (a -> a -> Bool) -> [a] -> a -> a firstMatch _ [] y = y firstMatch p (x:s) y = if index >= (length (x:s)) then y else (x:s) !! index where index = indexOf True (zipWith p (x:s) s) indexOf :: (Eq a) => a -> [a] -> Int indexOf _ [] = 10 indexOf c (x:s) = if c==x then 0 else 1 + indexOf c s }}} that I could load, run and reload. \\ ** After I wrote this and tried to reload:** {{{ countInversions :: (Ord a) => [a] -> Int countInversions [] = 0 countInversions (x:s) = (countSame (True==) (map (x>) s)) + countInversions s countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s }}} \\ **I get error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ Now I cannot reaload or even load this file (but when I remove the added part, everything is OK) \\ I hope I found u a bug :) \\ Have a nice day ps. with my playing I discover that == **THIS GIVES THE ERROR** \\ {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s }}} \\And works OK when header is gone -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
I have no idea what causes it (maybe my mistake) so I probably will give you more code then necessaty. Sorry for that. \\ **I had working code:**
{{{ f :: [[Bool]] -> ([Bool], [[Bool]]) f [] = ([True], g []) f (x:xs) = (g x, g xs)
g :: [a] -> [a] g [] = [] g x = x
listITE :: [Bool] -> [a] -> [a] -> [a] listITE [] _ _ = [] listITE _ _ [] = [] listITE _ [] _ = [] listITE (b:bs) (x:xs) (y:ys) = [(if b then x else y)] ++ listITE bs xs ys --zipWith (\x,y -> if ) ;
firstMatch :: (a -> a -> Bool) -> [a] -> a -> a firstMatch _ [] y = y firstMatch p (x:s) y = if index >= (length (x:s)) then y else (x:s) !! index where index = indexOf True (zipWith p (x:s) s)
indexOf :: (Eq a) => a -> [a] -> Int indexOf _ [] = 10 indexOf c (x:s) = if c==x then 0 else 1 + indexOf c s }}} that I could load, run and reload. \\
** After I wrote this and tried to reload:** {{{ countInversions :: (Ord a) => [a] -> Int countInversions [] = 0 countInversions (x:s) = (countSame (True==) (map (x>) s)) + countInversions s
countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s
}}} \\
**I get error:**\\
''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ Now I cannot reaload or even load this file (but when I remove the added part, everything is OK) \\
I hope I found u a bug :) \\
Have a nice day
ps. with my playing I discover that
== **THIS GIVES THE ERROR** \\
{{{
countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + indexOf c s }}} \\And works OK when header is gone
New description: Hello, \\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ **gives me an error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ - All works when header is gone. - I put this code in separate file and error still occurs so it should not have any dependencies. I hope I found u a bug :) \\ Have a nice day -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
\\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\
**gives me an error:**\\
''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\
- All works when header is gone. - I put this code in separate file and error still occurs so it should not have any dependencies.
I hope I found u a bug :) \\ Have a nice day
New description: Hello, \\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ (There is a mistake in heared countSame :: (Ord a) => (a -> Bool) **->** [a] -> Int) \\ **gives me an error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ - On some machines correctly recognized as broken header - I put this code in separate file and error still occurs so it should not have any dependencies. I hope I found u a bug :) \\ Have a nice day -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
\\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ (There is a mistake in heared countSame :: (Ord a) => (a -> Bool) **->** [a] -> Int) \\
**gives me an error:**\\
''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\
- On some machines correctly recognized as broken header - I put this code in separate file and error still occurs so it should not have any dependencies.
I hope I found u a bug :) \\ Have a nice day
New description: Hello, \\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ (There is a mistake in heared countSame :: (Ord a) => (a -> Bool) **->** [a] -> Int) \\ **gives me an error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ - On some machines correctly recognized as broken header - I put this code in separate file and error still occurs so it should not have any dependencies. - (found on manjaro linux, ubuntu works OK. I have no other machines to compare) I hope I found u a bug :) \\ Have a nice day -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
\\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ (There is a mistake in heared countSame :: (Ord a) => (a -> Bool) **->** [a] -> Int) \\
**gives me an error:**\\
''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\
- On some machines correctly recognized as broken header - I put this code in separate file and error still occurs so it should not have any dependencies. - (found on manjaro linux, ubuntu works OK. I have no other machines to compare)
I hope I found u a bug :) \\ Have a nice day
New description: Hello, \\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ (There is a mistake in header ''countSame :: (Ord a) => (a -> Bool) **!->!** [a] -> Int'') \\ **gives me an error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ - On some machines correctly recognized as broken header - I put this code in separate file and error still occurs so it should not have any dependencies. - (found on manjaro linux, ubuntu works OK. I have no other machines to compare) I hope I found u a bug :) \\ Have a nice day -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by xvrbka1: Old description:
Hello,
\\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ (There is a mistake in header ''countSame :: (Ord a) => (a -> Bool) **!->!** [a] -> Int'') \\
**gives me an error:**\\
''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\
- On some machines correctly recognized as broken header - I put this code in separate file and error still occurs so it should not have any dependencies. - (found on manjaro linux, ubuntu works OK. I have no other machines to compare)
I hope I found u a bug :) \\ Have a nice day
New description: Hello, \\ ** This code:** {{{ countSame :: (Ord a) => (a -> Bool) [a] -> Int countSame _ [] = 0; countSame p (x:s) = (if p x then 1 else 0) + (countSame p s) }}} \\ (There is a mistake in header ''countSame :: (Ord a) => (a -> Bool) **#->#** [a] -> Int'') \\ **gives me an error:**\\ ''ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): repSplitAppTys a_a6Xb[sk:1] Bool [] 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:808:9 in ghc:Type'' \\ - On some machines correctly recognized as broken header - I put this code in separate file and error still occurs so it should not have any dependencies. - (found on manjaro linux, ubuntu works OK. I have no other machines to compare) I hope I found u a bug :) \\ Have a nice day -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14371: ghc: panic! when reloading file with code -------------------------------------+------------------------------------- Reporter: xvrbka1 | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13819 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13819 Comment: Thanks for the bug report. This is a duplicate of #13819, and has been fixed in the upcoming GHC 8.2.2 release: {{{ $ /opt/ghc/8.2.2/bin/ghci Bug.hs GHCi, version 8.2.1.20170928: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Main ( Bug.hs, interpreted ) Bug.hs:1:25: error: • Expecting one fewer arguments to ‘a -> Bool’ Expected kind ‘* -> *’, but ‘a -> Bool’ has kind ‘*’ • In the type signature: countSame :: (Ord a) => (a -> Bool) [a] -> Int | 1 | countSame :: (Ord a) => (a -> Bool) [a] -> Int | ^^^^^^^^^^^^^^^ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14371#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC