Skip to content

Unboxed tuples fails in GHCi (7.8.2)

Creating an unboxed tuple in GHCi causes panic:

➜  ~  ghci -XUnboxedTuples
GHCi, version 7.8.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
ghci> let a = (# 1 #)
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.2 for x86_64-unknown-linux):
        dsLet: unlifted
    AbsBinds [a{tv auv} [tv]] [$dNum_auw{v} [lid]]
      {Exports: [a{v asV} [lid] <= a{v asY} [lid]
                   /\(@ a{tv auy} [tv]).
                   \($dNum_auz{v} [lid] :: base:GHC.Num.Num{tc 2b} a{tv auy} [tv]).
                   let {EvBinds{$dNum_auC{v} [lid] = $dNum_auz{v} [lid]}}
                   (<>) @ a{tv auy} [tv] $dNum_auC{v} [lid]]
       Exported types: a{v asV} [lid]
                         :: forall a{tv auv} [tv].
                            base:GHC.Num.Num{tc 2b} a{tv auv} [tv] =>
                            (# a{tv auv} [tv] #)
                       [LclId, Str=DmdType]
       Binds: {<interactive>:2:5-15}
              a{v asY} [lid] :: (# a{tv auv} [tv] #)
              [LclId, Str=DmdType]
              a{v asY}
                = {<interactive>:2:9-15}
                  (# 1 ((base:GHC.Num.fromInteger{v 02A}) @ a{tv auv} [tv]
                          $dNum_au8{v} [lid]
                          1) #)
              <>
       Evidence: EvBinds{$dNum_au8{v} [lid] = $dNum_auw{v} [lid]}}
    base:GHC.Base.returnIO{v 0z} [gid]
      @ [()]
      (ghc-prim:GHC.Types.:{(w) v 65} [gid[DataCon]]
         @ ()
         (ghc-prim:GHC.Prim.unsafeCoerce#{(w) v 0u} [gid]
            @ (forall a{tv auv} [tv].
               base:GHC.Num.Num{tc 2b} a{tv auv} [tv] =>
               (# a{tv auv} [tv] #))
            @ ()
            a{v asV} [lid])
         (ghc-prim:GHC.Types.[]{(w) v 6n} [gid[DataCon]] @ ()))

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

ghci> let a = (# 1, 2 #)
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.2 for x86_64-unknown-linux):
        dsLet: unlifted
    AbsBinds [a{tv auW} [tv], a{tv auX} [tv]] [$dNum_auY{v} [lid],
                                               $dNum_auZ{v} [lid]]
      {Exports: [a{v auK} [lid] <= a{v auN} [lid]
                   /\(@ a{tv av1} [tv]).
                   /\(@ a{tv av2} [tv]).
                   \($dNum_av3{v} [lid] :: base:GHC.Num.Num{tc 2b} a{tv av2} [tv]).
                   \($dNum_av4{v} [lid] :: base:GHC.Num.Num{tc 2b} a{tv av1} [tv]).
                   let {EvBinds{$dNum_av8{v} [lid] = $dNum_av3{v} [lid]
                                $dNum_av9{v} [lid] = $dNum_av4{v} [lid]}}
                   (<>) @ a{tv av1} [tv] @ a{tv av2} [tv] $dNum_av8{v} [lid]
                     $dNum_av9{v} [lid]]
       Exported types: a{v auK} [lid]
                         :: forall a{tv auW} [tv] a{tv auX} [tv].
                            (base:GHC.Num.Num{tc 2b} a{tv auX} [tv],
                             base:GHC.Num.Num{tc 2b} a{tv auW} [tv]) =>
                            (# a{tv auW} [tv], a{tv auX} [tv] #)
                       [LclId, Str=DmdType]
       Binds: {<interactive>:3:5-18}
              a{v auN} [lid] :: (# a{tv auW} [tv], a{tv auX} [tv] #)
              [LclId, Str=DmdType]
              a{v auN}
                = {<interactive>:3:9-18}
                  (# 1 ((base:GHC.Num.fromInteger{v 02A}) @ a{tv auW} [tv]
                          $dNum_auR{v} [lid]
                          1), 
                     2 ((base:GHC.Num.fromInteger{v 02A}) @ a{tv auX} [tv]
                          $dNum_auT{v} [lid]
                          2) #)
              <>
       Evidence: EvBinds{$dNum_auR{v} [lid] = $dNum_auZ{v} [lid]
                         $dNum_auT{v} [lid] = $dNum_auY{v} [lid]}}
    base:GHC.Base.returnIO{v 0z} [gid]
      @ [()]
      (ghc-prim:GHC.Types.:{(w) v 65} [gid[DataCon]]
         @ ()
         (ghc-prim:GHC.Prim.unsafeCoerce#{(w) v 0u} [gid]
            @ (forall a{tv auW} [tv] a{tv auX} [tv].
               (base:GHC.Num.Num{tc 2b} a{tv auX} [tv],
                base:GHC.Num.Num{tc 2b} a{tv auW} [tv]) =>
               (# a{tv auW} [tv], a{tv auX} [tv] #))
            @ ()
            a{v auK} [lid])
         (ghc-prim:GHC.Types.[]{(w) v 6n} [gid[DataCon]] @ ()))

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

ghci> 
Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC hvr
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information