0
bmiTell :: => Double -> String
bmiTell bmi
    | bmi <= 18.5 = "You're underweight, you emo, you!"
    | bmi <= 25.0 = "You're supposeldly normal. Pffft, I bet you're ugly!"
    | bmi <= 30.0 = "You're fat! Lose some weight, fatty!"
    | otherwise   = "You are a whale, congratulations!"

This code got me an error, "parse error on input '=>'" I have no idea why. Any help? thank you !

1 Answer 1

5

The line:

bmiTell :: => Double -> String

Has the symbol =>, which is used to separate out class constraints from the signature containing constrained types. However, you don't have any constraints, nothing such as Show a =>. The solution? Delete it!

bmiTell :: Double -> String
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.