Panic on type inference with vectorised parallel arrays
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ParallelArrays #-}
module Y where
import Data.Array.Parallel
#ifndef BUG
func :: Bool -> [: [: a :] :]
#endif
func True = [: [: :] :]
func False = [: j | j <- func True :]
Result of ghc --make -fvectorise Y.hs
:
[1 of 1] Compiling Y ( C:\tmp\Y.hs, C:\tmp\Y.o )
exprType TYPE [:a{tv b} [tv]:]
exprType TYPE a{tv b} [tv]
exprType TYPE [:a{tv b} [tv]:]
exprType TYPE a{tv b} [tv]
exprType TYPE [:a{tv b} [tv]:]
exprType TYPE a{tv b} [tv]
exprType TYPE [:a{tv b} [tv]:]
exprType TYPE a{tv b} [tv]
Warning: vectorisation failure: identityConv: quantified type changes under vectorisation
Could NOT call vectorised from original version Y.func
Result of ghc --make -fvectorise -DBUG Y.hs
:
[1 of 1] Compiling Y ( C:\tmp\Y.hs, C:\tmp\Y.o )
exprType TYPE [:t{tv a30W} [tv]:]
exprType TYPE t{tv a30W} [tv]
exprType TYPE [:t{tv a30W} [tv]:]
exprType TYPE t{tv a30W} [tv]
exprType TYPE [:t{tv a30W} [tv]:]
exprType TYPE t{tv a30W} [tv]
exprType TYPE [:t{tv a30W} [tv]:]
exprType TYPE t{tv a30W} [tv]
Warning: vectorisation failure: identityConv: quantified type changes under vectorisation
Could NOT call vectorised from original version func
exprType TYPE t{tv a30W} [tv]
Warning: vectorisation failure: identityConv: quantified type changes under vectorisation
Could NOT call vectorised from original version Y.func
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.1 for x86_64-unknown-mingw32):
nameModule func1{v r3ap}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
And so I did.
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |