purescript-protobuf icon indicating copy to clipboard operation
purescript-protobuf copied to clipboard

Why is everything in MonadEffect

Open jamesdbrock opened this issue 5 years ago • 0 comments
trafficstars

Everything in this library happens in MonadEffect. Why? Because purescript-arraybuffer is all mutable and in MonadEffect. If there were an immutable frontend ArrayBuffer library, like Node Buffer, then we could refactor all of purescript-protobuf to be pure.

In the meantime, it is totally fine to run everything in unsafePerformEffect. https://github.com/jamesdbrock/purescript-arraybuffer-builder/issues/2

jamesdbrock avatar Nov 06 '20 02:11 jamesdbrock