Closed vmchale closed 5 years ago
The ALSA API uses the C int
type (Haskell CInt
type), which has a wider range than Int
. GHC represents small Integer
values as Int
without using GMP, so I would be surprised if this was a bottleneck. Still, I agree it would be ideal if the Haskell interface used a type with the same representation as the C API; would it be awkward if the Haskell interface used CInt
?
I'd be satisfied with CInt
, yes. I think Int
is probably the same thing barring some odd platform, but it is easy to convert either way.
Is there any reason the
Integer
type is used? I'd like type signatures downstream to useInt
s instead ofInteger
s. Or really anything efficient (I assume ALSA doesn't bind GMP?)