google / codeworld

Educational computer programming environment using Haskell
http://code.world
Apache License 2.0
1.24k stars 197 forks source link

User-reported unhelpful error message #1640

Open codeworld-feedback opened 5 months ago

codeworld-feedback commented 5 months ago

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

Comment:

I did not understand

Message:

program.hs:40:12-21: error:
    • No instance for (Integral Double) arising from a use of ‘mod’
    • In the first argument of ‘(*)’, namely ‘(t `mod` 24)’
      In the expression: (t `mod` 24) * (pi / 12)
      In an equation for ‘angle’: angle t = (t `mod` 24) * (pi / 12)