codeworld icon indicating copy to clipboard operation
codeworld copied to clipboard

User-reported unhelpful error message

Open codeworld-feedback opened this issue 6 months ago • 0 comments

Program: https://code.world/haskell#Py5hXKhhFnywuPSP_rPnY0A

Message:

program.hs:2:34-52: error:
    • Couldn't match type ‘[Char]’ with ‘IO ()’
      Expected type: IO ()
        Actual type: String
    • In the second argument of ‘(<>)’, namely ‘show (circleArea 12)’
      In a stmt of a 'do' block:
        putStrLn ("Area of r=12 :") <> show (circleArea 12)
      In the expression:
        do putStrLn ("Area of r=12 :") <> show (circleArea 12)
           print (rectangleArea 10 20)

codeworld-feedback avatar Sep 19 '25 17:09 codeworld-feedback