[GHC] #14194: ghci 8.0.2 panics

GHC ghc-devs at haskell.org
Thu Sep 7 11:10:51 UTC 2017


#14194: ghci 8.0.2 panics
-------------------------------------+-------------------------------------
        Reporter:  jakubdaniel       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:  x86_64
                                     |  (amd64)
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by jakubdaniel:

Old description:

> I know it is rather hard to reproduce but (I currently cannot check
> whether it still occurs in 8.0.2+):
>
> git clone https://github.com/jakubdaniel/expressions
> git clone https://github.com/jakubdaniel/expressions-z3
> hg clone https://bitbucket.org/jd823592/z3-haskell
>
> cd expressions-z3
> cabal sandbox init
> cabal sandbox add-source ../expression
> cabal sandbox add-source ../z3-haskell
> cabal install && cabal exec ghci
>
> λ> -- forget to :set -XTypeInType
> λ> :m Z3.Monad Data.Expression
> λ> -- forget to :m Data.Expression.Z3
> λ> evalZ3 $ astToString =<< toZ3 (forall [var "x" :: Var 'IntegralSort]
> (exists [var "y" :: Var 'IntegralSort] (var "x" .+. var "y" .=. cnst 0))
> :: Lia 'BooleanSort)
>
> ghc: panic! (the 'impossible' happened)
>   (GHC version 8.0.2 for x86_64-unknown-linux):
>         initTc: unsolved constraints
>   WC {wc_insol =
>         [W] toZ3_a4CL :: t_a4CK[tau:1] (CHoleCan: toZ3)
>         [W] toZ3_a4Dx :: t_a4Dw[tau:1] (CHoleCan: toZ3)}
>
> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

New description:

 I know it is rather hard to replicate but (I currently cannot check
 whether it still occurs in 8.0.2+):

     {{{
     git clone https://github.com/jakubdaniel/expressions
     git clone https://github.com/jakubdaniel/expressions-z3
     hg clone https://bitbucket.org/jd823592/z3-haskell
     wget
 https://github.com/Z3Prover/z3/releases/download/z3-4.4.1/z3-4.4.1-x64-ubuntu-14.04.zip
     unzip z3-4.4.1-x64-ubuntu-14.04.zip

     cd expressions-z3
     cabal sandbox init
     cabal sandbox add-source ../expression
     cabal sandbox add-source ../z3-haskell
     cabal install --extra-include-
 dirs=$PWD/../z3-4.4.1-x64-ubuntu-14.04/include --extra-lib-
 dirs=$PWD/../z3-4.4.1-x64-ubuntu-14.04/bin && cabal exec ghci

     λ> -- forget to :set -XTypeInType
     λ> :m Z3.Monad Data.Expression
     λ> -- forget to :m Data.Expression.Z3
     λ> evalZ3 $ astToString =<< toZ3 (forall [var "x" :: Var
 'IntegralSort] (exists [var "y" :: Var 'IntegralSort] (var "x" .+. var "y"
 .=. cnst 0)) :: Lia 'BooleanSort)
     ghc: panic! (the 'impossible' happened)
       (GHC version 8.0.2 for x86_64-unknown-linux):
             initTc: unsolved constraints
       WC {wc_insol =
             [W] toZ3_a4CL :: t_a4CK[tau:1] (CHoleCan: toZ3)
             [W] toZ3_a4Dx :: t_a4Dw[tau:1] (CHoleCan: toZ3)}

     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
     }}}

--

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14194#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list