mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-18 00:31:57 +03:00
937aa8fc43
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. |
||
---|---|---|
.. | ||
Bool | ||
Fin | ||
IOArray | ||
List | ||
Nat | ||
Primitives | ||
Vect | ||
Bool.idr | ||
Buffer.idr | ||
DPair.idr | ||
Either.idr | ||
Fin.idr | ||
Fuel.idr | ||
Fun.idr | ||
IOArray.idr | ||
IORef.idr | ||
List1.idr | ||
List.idr | ||
Maybe.idr | ||
Morphisms.idr | ||
Nat.idr | ||
Ref.idr | ||
Rel.idr | ||
So.idr | ||
Stream.idr | ||
Strings.idr | ||
Vect.idr |