haskell / haskell/binary

MonadFix instance required

Open
#168 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
120
Forks
70
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attempted MonadFix implementation in commit 551591dd05e3cb7769a2d61fdc16d8f45a69b88e and inspect the Put monad's strictness around the fixed point. Done means a MonadFix instance can use an expression's output length while constructing that expression without producing an undefined fixed point.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.