module Indicator ( Indicator(..) , fromGlycemicLoad ) where import Prelude data Indicator = Good | Medium | Bad instance showIndicator :: Show Indicator where show Good = "Good" show Medium = "Medium" show Bad = "Bad" fromGlycemicLoad :: Number -> Indicator fromGlycemicLoad n | n <= 10.0 = Good | n < 20.0 = Medium | otherwise = Bad