Open code5hot opened 5 years ago
Hi, I need a MonadFix instance for the Put monad so I can use the length of an expressions output as a parameter to construct the expression (for example, to output the offset to the end of a header at some place within the header itself).
I attempted to write the instance of MonadFix but there is excess strictness somewhere that causes the fixedpoint to be undefined: https://github.com/code5hot/binary/commit/551591dd05e3cb7769a2d61fdc16d8f45a69b88e#commitcomment-34039617
Any suggestions on how to complete this mfix implementation?
Hi, I need a MonadFix instance for the Put monad so I can use the length of an expressions output as a parameter to construct the expression (for example, to output the offset to the end of a header at some place within the header itself).
I attempted to write the instance of MonadFix but there is excess strictness somewhere that causes the fixedpoint to be undefined: https://github.com/code5hot/binary/commit/551591dd05e3cb7769a2d61fdc16d8f45a69b88e#commitcomment-34039617
Any suggestions on how to complete this mfix implementation?