Idris2/libs
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
..
base [ refactor ] introducing Namespace (#638) 2020-09-05 09:41:31 +01:00
contrib Add missing Data.Stream.Extra module to contrib.ipkg 2020-08-28 14:26:11 +01:00
network Use the same naming convention for foreign primitives 2020-08-19 14:05:28 +01:00
prelude add semigroup/monoid instances for Unit/() 2020-09-02 08:42:00 +01:00