Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Several property functions were added for Bools#4787

Closed
buzden wants to merge 3 commits into
idris-lang:masterfrom
buzden:bool-properties
Closed

Several property functions were added for Bools#4787
buzden wants to merge 3 commits into
idris-lang:masterfrom
buzden:bool-properties

Conversation

@buzden

@buzden buzden commented Dec 1, 2019

Copy link
Copy Markdown
Contributor

Nats have nice property functions that are e.g. applicable in rewrite (like commutativity, neutral element and so), but Bools do not have such. This PR adds some of such properties for not, && and ||.

@clayrat

clayrat commented Dec 1, 2019

Copy link
Copy Markdown
Contributor

@buzden

buzden commented Dec 1, 2019

Copy link
Copy Markdown
Contributor Author

Most of these already exist in https://github.com/idris-lang/Idris-dev/blob/master/libs/contrib/Data/Bool/Extra.idr

Oooops. But why they are in extra, but not in prelude?

@clayrat

clayrat commented Dec 1, 2019

Copy link
Copy Markdown
Contributor

I think the general idea is that prelude nowadays is seen as a bit overgrown, so it's better to extract non-essential things like property proofs into base or contrib

@buzden

buzden commented Dec 1, 2019

Copy link
Copy Markdown
Contributor Author

I think the general idea is that prelude nowadays is seen as a bit overgrown, so it's better to extract non-essential things like property proofs into base or contrib

The problem is when something in base library seems to need something from the contrib. contrib depends in base but not vice-versa.

Does it mean that such things should also go to the contrib library? Or, maybe, some things should "leak" somehow from the contrib to the base?

@buzden

buzden commented Dec 2, 2019

Copy link
Copy Markdown
Contributor Author

It looks like base package is better place for existing module than contrib. I suggested this change in the #4789.

@buzden buzden closed this Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants