Skip to content

Conversation

@Rembane
Copy link
Contributor

@Rembane Rembane commented Dec 27, 2025

Before this change the empty menu could either be represented by Left NoLunch or Right [], which introduces an unnecessary ambiguity. This commit does not let a menu be empty by using the excellent NonEmpty type, and then doing all the necessary changes in the code base.

Before this change the empty menu could either be represented by `Left
NoLunch` or `Right []`, which introduces an unnecessary ambiguity. This
commit does not let a menu be empty by using the excellent `NonEmpty`
type, and then doing all the necessary changes in the code base.
Copy link
Contributor

@Jassob Jassob left a comment

Choose a reason for hiding this comment

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

Looks solid enough to me!

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.

Think about what I mentioned in my other comment, it doesn't really matter either way. Good idea :D

...after feedback from Pingu. This lets us remove an import if we're
ready to deconstruct the list and then reconstruct it as a non empty
list. It produces surprisingly pretty code.
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.

4 participants