Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Kårres properly display when there is no lunch #131

Merged
merged 5 commits into from
Jun 10, 2024
Merged

Conversation

Multipacker
Copy link
Contributor

No description provided.

@@ -108,6 +108,7 @@ parse lang =
>=> mapM menuParser
)
)
>=> pure . filter ((/= "stängt") . _mFood)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could instead lens for it to be more inline with the rest of the code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also use filterM and make the fetch a pure

Comment on lines +31 to 35
data Menu = Menu
{ _mName :: Text
, _mFood :: Text
}
deriving (Eq, Show)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data Menu = Menu
{ _mName :: Text
, _mFood :: Text
}
deriving (Eq, Show)
data Menu = Menu
{ _mName :: Text
, _mFood :: Text
}
deriving (Eq, Show)
makeLenses ''Menu

would create lenses with the names mName and mFood.

@@ -108,6 +110,7 @@ parse lang =
>=> mapM menuParser
)
)
>=> filterM (((/= "stängt") <$>) <$> (^.^ mFood))
Copy link
Contributor

@The1Penguin The1Penguin Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +33 to +35
(^.^) :: Monad m => s -> Getting a s a -> m a
(^.^) = (pure .) . (^.)
infixl 8 ^.^
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are so happy now ^.^

deriving (Eq, Show)

makeLenses ''Menu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lenses are good to be inline with the style of code in this repo

Copy link
Contributor

@The1Penguin The1Penguin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SKyletoft
Copy link

Snälla nej

@The1Penguin
Copy link
Contributor

This fixes #130

@The1Penguin The1Penguin merged commit c82bdbf into main Jun 10, 2024
1 check passed
@The1Penguin The1Penguin deleted the vegan-fix branch June 10, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants