on master help sign in
Export Bits types as C functions

This aims to address #3082

commit6c4074b078a4189da46491c355002b3d7b12e2ec authorEdwin Brady <ecb10@st-andrews.ac.uk> dateMon 4 Apr 2016, 14:31 (11 years ago) parent1036f29
1 file changed+5−1
src/IRTS/CodegenC.hs+5−1
src/IRTS/CodegenC.hs+5−1
@@ -730,7 +730,11 @@ ctype t = error "Can't happen: Not a valid interface type " ++ show t
730730carith (FCon i)
731731 | i == sUN "C_IntChar" = "char"
732732 | i == sUN "C_IntNative" = "int"
733−carith t = error "Can't happen: Not an exportable arithmetic type"
733+ | i == sUN "C_Bits8" = "uint8_t"
734+ | i == sUN "C_Bits16" = "uint16_t"
735+ | i == sUN "C_Bits32" = "uint32_t"
736+ | i == sUN "C_Bits64" = "uint64_t"
737+carith t = error $ "Can't happen: Not an exportable arithmetic type " ++ show t
734738
735739cdesc (FStr s) = s
736740cdesc s = error "Can't happen: Not a valid C name"