aboutsummaryrefslogtreecommitdiff
path: root/src/Indicator.purs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Indicator.purs')
-rw-r--r--src/Indicator.purs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Indicator.purs b/src/Indicator.purs
index 39a98ca..751c069 100644
--- a/src/Indicator.purs
+++ b/src/Indicator.purs
@@ -1,5 +1,6 @@
module Indicator
( Indicator(..)
+ , className
, fromGlycemicLoad
) where
@@ -7,10 +8,10 @@ import Prelude
data Indicator = Good | Medium | Bad
-instance showIndicator :: Show Indicator where
- show Good = "Good"
- show Medium = "Medium"
- show Bad = "Bad"
+className :: Indicator -> String
+className Good = "good"
+className Medium = "medium"
+className Bad = "bad"
fromGlycemicLoad :: Number -> Indicator
fromGlycemicLoad n