diff --git a/src/Model/Linsen.hs b/src/Model/Linsen.hs index 70beead..bb0d2d9 100644 --- a/src/Model/Linsen.hs +++ b/src/Model/Linsen.hs @@ -117,12 +117,11 @@ parse day = [] -> fail "Failed to index into richtext" (v:_) -> pure v) >=> (.: "text") - >=> \s -> if - pure day == parseTime swedishTimeLocale "%A %d-%m-%Y" s - then if length v' >= 9 - then pure v' - else pure mempty - else fail "Unable to parse day")) + >=> \s -> + case pure day == parseTime swedishTimeLocale "%A %d-%m-%Y" s of + True | length v' >= 9 -> pure v' + | otherwise -> pure mempty + False -> fail "Unable to parse day")) >=> menuParser ) )