> Actually, there is, it's called inline assembly. But any decent compiler has an intrinsic anyways.
Which is a language extension and not a C feature.
Nothing prevents an Haskell compiler to provide similar extensions.
> So, I have this type data Vector3 = Vector3 Float Float Float. Can I change its layout without having to change the rest of the code? The only way I know is compiler-specific unboxing and even that has little predictable effect, as we don't even know if this type is going to hold boxed values to begin with.
Yeah, with my limited Haskell knowledge I would say you would need to make use of Data.Vector.Unboxed or use unboxed values as compiler extension like on JHC.
Still, there are ways to improve performance on Haskell applications, even if they require new ways of thinking.
Back in the day higher level languages (including C) were quite bad at generating code on home computers, and we had to use Assembly if we cared about performance.
So like C compiler quality and tooling has improved in these last decades due to high industry use, Haskell tools can also improve if its acceptance in the industry keeps increasing.
And then we can probably enjoy such tools for Haskell as well.