aboutsummaryrefslogtreecommitdiff
path: root/src/Indicator.purs
diff options
context:
space:
mode:
authorJoris2017-04-09 18:50:36 +0200
committerJoris2017-04-09 18:50:36 +0200
commit7c209f271ffc3122ada0331094e01dc6e409c2fb (patch)
tree9abb5fab0d72dbd6f793595dca8509bae96c5929 /src/Indicator.purs
parent69be67a67503c0cb80153510083513f92de952bf (diff)
Add search input
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