From 42a4ac003f57de3c3e6722be15143708830693f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Fri, 6 Oct 2023 01:20:26 +0200 Subject: [PATCH 1/3] Add a guide for namespaces --- docs/docs/intro.md | 4 ++++ docs/docs/namespaces.md | 43 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 docs/docs/namespaces.md diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 35d24642..5bac245c 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -2,3 +2,7 @@ title: Flora.pm slug: / --- + +Read more about: + +* [Namespaces](/namespaces) diff --git a/docs/docs/namespaces.md b/docs/docs/namespaces.md new file mode 100644 index 00000000..dd89b043 --- /dev/null +++ b/docs/docs/namespaces.md @@ -0,0 +1,43 @@ +--- +title: Flora Namespaces +slug: namespaces +--- + +In Flora, packages are categorised in a namespace to mark their provenance. They start with a `@` and allow us to refer to packages unambiguously or mark their importance. + +## @haskell Packages + +Some packages are foundational to the ecosystem and maintained by either the Core Libraries Committee or the GHC team, and this makes them unique in terms of the expectations we have from them. + +These packages live in the [`@haskell`] namespace to show that they are stable and reliable. Some example of packages are `base`, `text`, `bytestring`, and `mtl`. + +## @hackage Packages + +This is where most third-party packages live, which you will find on [Hackage](https://hackage.haskell.org). + +## @cardano Packages + +Flora also indexes the [Cardano Haskell Packages (CHaP)][CHaP], whose packages live under the [`@cardano`] namespace. + +To use them in your own project, insert the following configuration in your `cabal.project` file: + +``` +repository cardano + url: https://input-output-hk.github.io/cardano-haskell-packages + secure: True + root-keys: + 3e0cce471cf09815f930210f7827266fd09045445d65923e6d0238a6cd15126f + 443abb7fb497a134c343faf52f0b659bd7999bc06b7f63fa76dc99d631f9bea1 + a86a1f6ce86c449c46666bda44268677abf29b5b2d2eb5ec7af903ec2f117a82 + bcec67e8e99cabfa7764d75ad9b158d72bfacf70ca1d0ec8bc6b4406d1bf8413 + c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56 + d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee +``` +and run `cabal update`. + +[`@haskell`]: https://flora.pm/packages/@haskell +[`@cardano`]: https://flora.pm/packages/@haskell +[`@hackage`]: https://flora.pm/packages/@hackage +[`@hackage/servant-server`]: https://flora.pm/packages/@hackage/servant-server +[`@haskell/text`]: https://flora.pm/packages/@haskell/text +[CHaP]: https://input-output-hk.github.io/cardano-haskell-packages From 0a099d157bf4f82dc0cb46d60c91432da4745ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Sat, 7 Oct 2023 13:29:39 +0200 Subject: [PATCH 2/3] Fix link and wording --- docs/docs/namespaces.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs/namespaces.md b/docs/docs/namespaces.md index dd89b043..ab581bc7 100644 --- a/docs/docs/namespaces.md +++ b/docs/docs/namespaces.md @@ -17,7 +17,8 @@ This is where most third-party packages live, which you will find on [Hackage](h ## @cardano Packages -Flora also indexes the [Cardano Haskell Packages (CHaP)][CHaP], whose packages live under the [`@cardano`] namespace. +Flora also indexes the [Cardano Haskell Packages (CHaP)][CHaP], an index of packages by the Cardano project. +These packages live under the [`@cardano`] namespace. To use them in your own project, insert the following configuration in your `cabal.project` file: @@ -36,7 +37,7 @@ repository cardano and run `cabal update`. [`@haskell`]: https://flora.pm/packages/@haskell -[`@cardano`]: https://flora.pm/packages/@haskell +[`@cardano`]: https://flora.pm/packages/@cardano [`@hackage`]: https://flora.pm/packages/@hackage [`@hackage/servant-server`]: https://flora.pm/packages/@hackage/servant-server [`@haskell/text`]: https://flora.pm/packages/@haskell/text From d333ba6adcdd531392936545d7900716a97f7928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Sun, 8 Oct 2023 13:23:54 +0200 Subject: [PATCH 3/3] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39b3e663..7fddb66e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Added more matches to the the natural language processing catergory ([#44](/~https://github.com/flora-pm/flora-server/pull/440)) * Colourise in red deprecation markers on the package page ([#438](/~https://github.com/flora-pm/flora-server/pull/439)) * Allow package imports from multiple repositories ([#444](/~https://github.com/flora-pm/flora-server/pull/444)) +* Add a page on namespaces in the documentation ([#451](/~https://github.com/flora-pm/flora-server/pull/451)) ## 1.0.13 -- 2023-09-17 * Exclude deprecated releases from latest versions and search ([#373](/~https://github.com/flora-pm/flora-server/pull/373))