google / google/codeworld

User-reported unhelpful error message

Open
#1,802 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

**Program:** https://code.world/haskell#PlluIfwylwWGLUS0ky9qN1Q

**Message:**

program.hs:13:26-29: error:
• Occurs check: cannot construct the infinite type: a ~ [a]
• In the expression: n : ns
In the expression: [n : ns]
In the expression:
if length ns == 3 then
[n : ns]
else
[n, (head ns), head (tail ns), ....] : breakItUp ns
• Relevant bindings include
ns :: [a] (bound at program.hs:12:14)
n :: a (bound at program.hs:12:12)
breakItUp :: [a] -> [[a]] (bound at program.hs:7:1)

Contributor guide

Open the contributing guide

Research direction

Reproduce the linked CodeWorld program and inspect how its Haskell compiler diagnostic is surfaced. The report names no repository files, entry points, or tests; done would require a clearly agreed improvement to this error message and verification that the linked example produces it.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.