Skip to content

Can't vectorise pattern matching on numeric literals

Trying to vectorise

toBool :: Int -> Bool
toBool 0 = False
toBool _ = True

we get

*** Vectorisation error ***
    Can't vectorise expression GHC.Prim.Int#
Trac metadata
Trac field Value
Version 7.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Data Parallel Haskell
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information