
27 Oct
2021
27 Oct
'21
5:18 a.m.
Hello, I have a bunch of C method that I need to call like this c'foo_unit16_t :: Ptr Word16 -> IO r c'foo_uint32_t :: Ptr Word32 -> IO r ... These methodes are called from a method like this process :: NativeType t => Dataframe t => IO r process df = do ... <pseudo code> case typeof t of WORD16 -> c'foo_unit16_t ... WORD32 -> c'foo_uint32_t ... Since there is type erasure, I would like to know what is the best way to write this process method. thanks for you help Frederic