[GHC] #14616: panic! initTc: unsolved constraints

#14616: panic! initTc: unsolved constraints -------------------------------------+------------------------------------- Reporter: w-j-w | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Compile-time (amd64) | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- New haskeller here, I was doing an exercise at http://exercism.io/exercises/haskell /rotational-cipher/readme and got the following error message from the compiler. {{{ Compiling Main ( RotationalCipher.hs, .stack-work/dist/x86_64 -linux-tinfo6/Cabal-1.24.2.0/build/Main.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): initTc: unsolved constraints WC {wc_insol = [W] find_a7hU :: t_a7hT[tau:1] (CHoleCan: find) [W] find_a7iF :: t_a7iE[tau:1] (CHoleCan: find)} Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Progress: 16/17 -- While building custom Setup.hs for package rotational-cipher-1.1.0.1 using: /home/websterw/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal- simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64 -linux-tinfo6/Cabal-1.24.2.0 build lib:rotational-cipher test:test --ghc- options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 }}} I was using the normal project setup that exercism uses for this problem, with my code residing a file called `RotationalCipher.hs`. The contents of this file are as follows. {{{ rotate :: Int -> String -> String rotate n = map (rot n) rot :: Int -> Char -> Char rot i c | c `elem` ['a'..'z'] = let translate = zip (lowershift n) ['a'..'z'] in fst (find (\x -> snd x == c) translate) | c `elem` ['A'..'Z'] = let translate = zip (uppershift n) ['A'..'Z'] in fst (find (\x -> snd x == c) translate) | otherwise = c where lowershift n = take 26 $ drop n $ cycle ['a'..'z'] uppershift n = take 26 $ drop n $ cycle ['A'..'Z'] }}} The error occured when I ran `stack test` I am using fedora linux as my operating system on x86_64 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14616 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14616: panic! initTc: unsolved constraints -------------------------------------+------------------------------------- Reporter: w-j-w | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.3 Component: Compiler | Version: 8.0.2 Resolution: duplicate | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #13106 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: new => closed * resolution: => duplicate * related: => #13106 * milestone: => 8.2.3 Comment: It appears that this is a slightly unusual duplicate of #13106, which was fixed in 8.2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14616#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC