4 ms·
It's the same thing with Haskell, or any other "real" system that, at some level, has to interface with low-level primitives. The platform gives you a pile of
by chadaustin 11y ago
It's the same thing with Haskell, or any other "real" system that, at some level, has to interface with low-level primitives. The platform gives you a pile of unsafe, low-level primitives ( https://hackage.haskell.org/package/ghc-prim-0.4.0.0/docs/GHC-Prim.html https://hackage.haskell.org/package/ghc-prim-0.4.0.0/docs/GH... ) on top of which you (or a library writer) can provide safe interfaces, e.g. https://hackage.haskell.org/package/buffer-builder https://hackage.haskell.org/package/buffer-builder
- MaxGabriel 11y agoThe unsafe low-level stuff gives rise to some great function names like `reallyUnsafePtrEquality` and `accursedUnutterablePerformIO` https://github.com/haskell/bytestring/blob/dd3c07d115840d13482426a0084a39201eb6b6d4/Data/ByteString/Internal.hs#L515-L546 https://github.com/haskell/bytestring/blob/dd3c07d115840d134...