kowainik / kowainik/stan

Wrong order of fields/missing fields in serialisation instances

Open
#292 0 comments 1 reaction 0 assignees View on GitHub
hardcore :rage4: inspection
Dominant language
Haskell
Stars
597
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Sometimes, when the code is polymorphic, it's very easy to use the wrong order of fields:

```haskell
data User = User
{ userName :: !Text
, userAge :: !Int
}

instance Binary User where
put User{..) = put userAge >> put userName
get = User <$> get <*> get
```

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the serialization-instance analysis and its tests, then use the User example to establish expected diagnostics for wrong ordering and missing fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.