Idris2
Idris2 copied to clipboard
Add dependent congruence of arity 1 and 2 for heterogeneous equality to Prelude
I'm not sure this needs to be in prelude, the library meant for things you almost can't write any program without.
Right, I remember now that Edwin emphasized that point of view a few times.
Hmm... Are cong and cong2 needed for almost any program, then?
"Not being able to write any program without" is rather vague. I am sure there are ways to interpret that for and against adding depCongX based on availability of congX. But I don't have a strong opinion. I don't mind relocating depCong or closing this altogether.
I'm comfortable with moving cong and cong2 out of the prelude and into base.
I'm comfortable with moving cong and cong2 out of the prelude and into base.
Please remember that such a change will break every library using these functions. Sure, the fix would be trivial, but we still have to be careful about breaking changes in the Prelude.
In my experience cong is needed as soon as you try to prove anything about any program.
In order to keep the name of the namespace consistent and expressive, I propose we place this function in a module Basics.Dependent in `base. How does that sound?
I've been forwarded this thread from #2601
what's the purpose of Basics in Prelude and what would it's role be in base?
Basics contains all the combinators on functions that we expect from a functional programming language, in particular it contains both cong and flip https://github.com/idris-lang/Idris2/blob/main/libs/prelude/Prelude/Basics.idr
Importing a dependent version of it seems to remain consistent with Prelude.Basics.
One thing that goes against this naming is that regular users aren't supposed to interact with the Basics namespace, so they almost certainly have no experience importing something from the Basics namespace, which would make importing from Basics.Dependent unintuitive
@Russoul @gallais @joelberkeley any feedback or ideas about Basics.Dependent in base?
One thing that goes against this naming is that regular users aren't supposed to interact with the Basics namespace
is this specific to Basics? Or is this just a consequence of being in Prelude?
is this specific to
Basics? Or is this just a consequence of being inPrelude?
It is a consequence of being in Prelude
@Russoul @gallais @joelberkeley any feedback or ideas about
Basics.Dependentinbase?
That works for me! I don't really have a preference.