Idris2/libs/base/Data
G. Allais 937aa8fc43
[ refactor ] introducing Namespace (#638)
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 #616 (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
..
Bool Add some algebra implementations 2020-07-17 08:25:20 -05:00
Fin Port Decidable.Order from Idris1 (#543) 2020-08-18 22:26:56 +01:00
IOArray Add experimental support for linear arrays 2020-06-12 14:08:00 +01:00
List Add list lemmas (#491) 2020-07-29 10:51:07 +01:00
Nat Port Decidable.Order from Idris1 (#543) 2020-08-18 22:26:56 +01:00
Primitives Add libraries 2020-05-18 14:00:08 +01:00
Vect Port Idris 1's Data.Vect.Quantifiers 2020-08-31 12:34:13 +01:00
Bool.idr Function mapping Not (x=True) to x=False was added for Bools (#322) 2020-06-19 11:13:13 +01:00
Buffer.idr Merge pull request #408 from melted/buffer_api 2020-07-21 10:43:17 +02:00
DPair.idr A port of Subset and Exists from Idris1. 2020-07-04 11:03:14 +01:00
Either.idr Add various instances from stdlib interfaces (Eq, Ord, DecEq) 2020-07-26 10:47:38 +01:00
Fin.idr Simplify Fin 2020-07-07 10:48:23 +01:00
Fuel.idr add Data.Fuel 2020-06-02 17:20:42 +02:00
Fun.idr Port Decidable.Order from Idris1 (#543) 2020-08-18 22:26:56 +01:00
IOArray.idr Back to HasIO, remove MonadIO 2020-06-21 19:21:22 +01:00
IORef.idr Back to HasIO, remove MonadIO 2020-06-21 19:21:22 +01:00
List1.idr [ refactor ] introducing Namespace (#638) 2020-09-05 09:41:31 +01:00
List.idr [ refactor ] suggested during SPLV 2020-08-27 10:14:55 +01:00
Maybe.idr Simplify Maybe 2020-07-07 10:48:23 +01:00
Morphisms.idr Export (~>) publicly. 2020-07-20 15:55:24 +01:00
Nat.idr [ fix ] succInjective does not use its arguments 2020-08-27 10:14:55 +01:00
Ref.idr Back to HasIO, remove MonadIO 2020-06-21 19:21:22 +01:00
Rel.idr Port Decidable.Order from Idris1 (#543) 2020-08-18 22:26:56 +01:00
So.idr various stdlib updates 2020-06-11 23:14:11 +02:00
Stream.idr [ refactor ] suggested during SPLV 2020-08-27 10:14:55 +01:00
Strings.idr Revert addition to ES preamble. 2020-08-25 10:25:45 +02:00
Vect.idr [ refactor ] introducing Namespace (#638) 2020-09-05 09:41:31 +01:00