Defining restricted subset of Storable for type match
问题 I am getting error for the code below - I suspect it has to do with the type signature of dispatch function which returns a Vector of type Storable a . What is the simple way to update dispatch function type signature to do only Int32 and CChar in type signature: {-# LANGUAGE BangPatterns #-} import Data.Vector.Storable as SV import Foreign.C.Types (CChar) import GHC.Int (Int32) data AList = I {-# UNPACK #-} !(SV.Vector Int32) | S {-# UNPACK #-} !(SV.Vector CChar) dispatch :: (Storable a) =>