argotorg / argotorg/hevm

Redundant `if` flagged by hlint

Open
#759 0 comments 0 reactions 0 assignees View on GitHub
enhancement low-priority
Dominant language
Haskell
Stars
358
Forks
79
Avg merge
1d 1h
Merged PRs (30d)
6

Description

```haskell
-- src/EVM.hs:(2490,7)-(2498,65): Warning: Redundant if
-- Found:
if offs64 + sz64 < sz64 then
vmError IllegalOverflow
else
if offs64 >= 0x0fffffff || sz64 >= 0x0fffffff then
vmError IllegalOverflow
else
accessUnboundedMemoryRange offs64 sz64 continue
-- Perhaps:
(if (offs64 + sz64 < sz64)
|| (offs64 >= 0x0fffffff || sz64 >= 0x0fffffff) then
vmError IllegalOverflow
else
accessUnboundedMemoryRange offs64 sz64 continue)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Open src/EVM.hs at the reported range around lines 2490–2498 and inspect the redundant if warning from hlint. Simplify the nested conditional as suggested, then run hlint or the project’s Haskell checks to confirm the warning is gone and existing behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.