diff --git a/app/Main.hs b/app/Main.hs index 302499a..f138ab3 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,11 +1,13 @@ module Main where import System.Random +import Data.Time data Fastfood = Kapsalon | Pizza | Lasagne | Nachos + | Friet | Durum deriving (Show, Eq, Ord, Enum, Read, Bounded) @@ -15,6 +17,12 @@ instance Random Fastfood where (x, g') -> (toEnum x, g') random = randomR (minBound, maxBound) +getCurrentWeekDay :: IO DayOfWeek +getCurrentWeekDay = dayOfWeek . utctDay <$> getCurrentTime main :: IO () -main = print =<< (randomIO :: IO Fastfood) +main = do + day <- getCurrentWeekDay + if day == Tuesday + then print Friet + else print =<< (randomIO :: IO Fastfood)