Skip to content

Commit

Permalink
This is a shorter but more cursed variant of the ififififif
Browse files Browse the repository at this point in the history
  • Loading branch information
Rembane committed Sep 25, 2024
1 parent 447934f commit d5fc2be
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Model/Linsen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
Expand Down

0 comments on commit d5fc2be

Please sign in to comment.