jfmengels/elm-review-simplify

Removes thunk in decoder, causes infinite loop

Open

#318 aperta il 24 ago 2024

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Elm (10 fork)github user discovery
bughelp wanted

Metriche repository

Star
 (22 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Hello! I've found a corner case when simplifying decoders.

The above simplification looks fine at first glance. The problem is that it actually changes the meaning of the code. There's a reason this decoder was written this way, using a thunk: this snippet of code lives inside the compose function, and after simplification, it will cause the function to recursively call itself in an infinite loop.

Guida contributor