1
1
mirror of https://github.com/idris-lang/Idris2.git synced 2024-12-15 06:13:26 +03:00
Commit Graph

23 Commits

Author SHA1 Message Date
Nick Drozd
9cca3a7d35
Use Not instead of -> Void () 2021-07-13 15:32:01 +01:00
Nick Drozd
a07d42ac91
Delete old Order file, update changelog and contributors () 2021-07-12 10:53:45 +01:00
Nick Drozd
63a6b16517 Cut unneeded type specifications 2021-06-28 16:22:27 +01:00
Fabián Heredia Montiel
dad4dcdaf8 Add totality annotations to src and libs/{prelude, base} 2021-06-12 21:06:08 -05:00
Guillaume ALLAIS
00067e8151 [ fix ] force indentation after a with 2021-02-23 10:52:22 +00:00
Denis Buzdalov
b355b12cdb Some cleanup was done. Changed code is mosly equivalent to the former.
A lot of useless matches of implicit arguments were removed.
2021-02-16 19:05:33 +00:00
Denis Buzdalov
0ac34538ec A function from Not (x = y) to decEq x y = No _ was added. 2021-02-16 12:43:50 +00:00
Stiopa Koltsov
0d363c9732 Add isYes function and friends
Added several functions for `Dec`. The set of functions and names
are picked consistently with `Maybe`:

* `isNothing` -> `isNo`
* `isJust` -> `isYes`
* `IsJust` -> `IsYes`
* `isItJust` -> `isItYes`

This is follow-up to 
2021-01-21 12:36:02 +00:00
Stiopa Koltsov
7264d40c56 Make isElem, DecEq public, not just export
... so they could be used in proof search.

Follow-up to 
2021-01-18 10:37:57 +00:00
Joey Eremondi
0eef8e58f9
Some utilities for Fin, relations and decidability () 2020-12-28 21:41:12 +00:00
G. Allais
3f6b99e979
[ fix ] RigCount for interface parameters () 2020-12-11 11:58:26 +00:00
Denis Buzdalov
4364793484 Type definition from Decidable.Equality was moved to a separate module
This is done to make able for `Data.*` modules of datatypes declared in
prelude to import modules that have their own definitions of `DecEq`
inside them (i.e. modules of datatypes declared in the `base`).
2020-12-04 19:09:05 +00:00
G. Allais
5e799563fa
[ contrib ] adding Data.Container () 2020-11-27 15:29:19 +00:00
G. Allais
d105dd11a7
[ breaking ] remove List1 related ambiguities () 2020-09-22 15:07:40 +01:00
Ohad Kammar
2ae330785b
[contrib] Add misc libraries to contrib ()
* [contrib] Add misc libraries to contrib

Expose some `private` function in libs/base that I needed, and seem like
their visibility was forgotten

I'd appreciate a code review, especially to tell me I'm
re-implementing something that's already elsewhere in the library

Mostly extending existing functionality:
* `Data/Void.idr`: add some utility functions for manipulating absurdity.
* `Decidable/Decidable/Extra.idr`: add support for double negation elimination in decidable relations
* `Data/Fun/Extra.idr`:
  + add `application` (total and partil) for n-ary functions
  + add (slightly) dependent versions of these operations
* `Decidable/Order/Strict.idr`: a strict preorder is what you get when
  you remove the diagonal from a pre-order. For example, `<` is the
  associated preorder for `<=` over `Nat`.
  Analogous to `Decidable.Order`. The proof search mechanism struggled
  a bit, so I had to hack it --- sorry.

Eventually we should move `Data.Fun.Extra.Pointwise` to `Data.Vect.Quantifiers` in base
but we don't have any interesting uses for it at the moment so it's not
urgent.

Co-authored by @gallais
2020-09-14 16:22:46 +01:00
G. Allais
937aa8fc43
[ refactor ] introducing Namespace ()
Until now namespaces were stored as (reversed) lists of strings.
It led to:

* confusing code where we work on the underlying representation of
  namespaces rather than say what we mean (using `isSuffixOf` to mean
  `isParentOf`)

* potentially introducing errors by not respecting the invariant cf.
  bug report  (but also name generation in the scheme backend
  although that did not lead to bugs as it was self-consistent AFAICT)

* ad-hoc code to circumvent overlapping interface implementation when
  showing / pretty-printing namespaces

This PR introduces a `Namespace` newtype containing a list of strings.
Nested namespaces are still stored in reverse order but the exposed
interface aims to support programming by saying what we mean
(`isParentOf`, `isApproximationOf`, `X <.> Y` computes to `X.Y`, etc.)
irrespective of the underlying representation.
2020-09-05 09:41:31 +01:00
Guillaume ALLAIS
529944267b Revert "[ refactor ] Introducing Namespace and ModuleIdent ()"
This reverts commit 481dc431e7.
2020-09-04 09:16:06 +01:00
G. Allais
481dc431e7
[ refactor ] Introducing Namespace and ModuleIdent ()
Until now namespaces were stored as (reversed) lists of strings.
It led to:

* confusing code where we work on the representation rather than say
  what we mean (e.g. using `isSuffixOf` to mean `isParentOf`)

* potentially introducing errors by not respecting the invariant cf.
  bug report  (but also name generation in the scheme backend
  although that did not lead to bugs as it was self-consistent AFAICT)

* ad-hoc code to circumvent overlapping interface implementations when
  showing / pretty-printing namespaces

This introduces a Namespace newtype containing non-empty lists of
strings. Nested namespaces are still stored in reverse order but the
exposed interface aims to support programming by saying what we mean
(`isParentOf`, `isApproximationOf`, `X <.> Y` computes to `X.Y`, etc.)
irrespective of the underlying representation.
2020-09-02 20:05:33 +01:00
Arnaud Bailly
8ecf664ff6
Port Decidable.Order from Idris1 () 2020-08-18 22:26:56 +01:00
Ohad Kammar
915b7bea38 Add various instances from stdlib interfaces (Eq, Ord, DecEq)
For Void and Either

This is because I ended up using them elsewhere, so why not include them in the stdlib.

Also expose left/rightInjective functions, as are used in the DecEq proofs.
2020-07-26 10:47:38 +01:00
Nick Drozd
7d1ee9dd08 Simplify Equality 2020-07-07 10:48:23 +01:00
Nick Drozd
7c923944ae Add %default total to a few modules 2020-07-07 10:48:23 +01:00
Edwin Brady
dec7dff622 Add libraries 2020-05-18 14:00:08 +01:00