[Solved] parse error in haskell


additionally you want to separate the bmi-calculator from the main function as it is a pure function without any side-effects

main :: IO ()
main = do
    putStrLn "Please Input your weight"
    w <- getLine
    let weight = read w :: Float
    putStrLn "Please Input your height"
    h <- getLine
    let height = read h :: Float
    putStrLn $ bmicalc weight height

bmicalc :: Float -> Float -> String
bmicalc weight height | bmi<=17.5 = "You are anorexic!"
                      | bmi<=20.7 = "You are underweight"
                      | bmi<=26.4 = "You are in normal range"
                      | bmi<=27.8 = "You are marginally overweight"
                      | bmi<=31.1 = "You are overweight"
                      | otherwise = "You are super OBESE!!"
                      where bmi=weight/(height*height)

1

solved parse error in haskell <- [closed]