Skip to content

User-reported unhelpful error message #1771

@codeworld-feedback

Description

@codeworld-feedback

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions