From 7c209f271ffc3122ada0331094e01dc6e409c2fb Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 9 Apr 2017 18:50:36 +0200 Subject: Add search input --- src/Indicator.purs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Indicator.purs') 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 -- cgit v1.2.3