From bc22eafd888594c6d62bc9cac421f485f106afe0 Mon Sep 17 00:00:00 2001 From: mangoiv Date: Fri, 26 Apr 2024 12:13:13 +0200 Subject: [PATCH] [chore] rename some things --- .gitignore | 2 ++ cabal.project | 2 +- doc/cookbook/generic/Generic.lhs | 2 +- doc/cookbook/index.rst | 2 +- .../NamedRoutes.lhs | 0 .../named-routes/cookbook-named-routes.cabal | 30 +++++++++++++++++++ doc/cookbook/namedRoutes/namedRoutes.cabal | 27 ----------------- .../structuring-apis/StructuringApis.lhs | 2 +- 8 files changed, 36 insertions(+), 31 deletions(-) rename doc/cookbook/{namedRoutes => named-routes}/NamedRoutes.lhs (100%) create mode 100644 doc/cookbook/named-routes/cookbook-named-routes.cabal delete mode 100644 doc/cookbook/namedRoutes/namedRoutes.cabal diff --git a/.gitignore b/.gitignore index 3b2084ae6..0a0ae1d1d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,8 @@ shell.nix # nix result* +.direnv +.pre-commit-config.yaml # local versions of things servant-multipart diff --git a/cabal.project b/cabal.project index a31a799ff..058396aec 100644 --- a/cabal.project +++ b/cabal.project @@ -37,7 +37,7 @@ packages: doc/cookbook/db-sqlite-simple doc/cookbook/file-upload doc/cookbook/generic - doc/cookbook/namedRoutes + doc/cookbook/named-routes doc/cookbook/hoist-server-with-context doc/cookbook/https doc/cookbook/jwt-and-basic-auth diff --git a/doc/cookbook/generic/Generic.lhs b/doc/cookbook/generic/Generic.lhs index 0c80930d0..4f9f3a38b 100644 --- a/doc/cookbook/generic/Generic.lhs +++ b/doc/cookbook/generic/Generic.lhs @@ -6,7 +6,7 @@ level. If you need nesting because you have different branches in your API tree, you might want to jump directly to the [Record-based APIs: the nested records -case](../namedRoutes/NamedRoutes.html) cookbook that broaches the subject. +case](../named-routes/NamedRoutes.html) cookbook that broaches the subject. Shall we begin? diff --git a/doc/cookbook/index.rst b/doc/cookbook/index.rst index 4d416e5f4..6a8b12041 100644 --- a/doc/cookbook/index.rst +++ b/doc/cookbook/index.rst @@ -20,7 +20,7 @@ you name it! structuring-apis/StructuringApis.lhs generic/Generic.lhs openapi3/OpenAPI.lhs - namedRoutes/NamedRoutes.lhs + named-routes/NamedRoutes.lhs https/Https.lhs db-mysql-basics/MysqlBasics.lhs db-sqlite-simple/DBConnection.lhs diff --git a/doc/cookbook/namedRoutes/NamedRoutes.lhs b/doc/cookbook/named-routes/NamedRoutes.lhs similarity index 100% rename from doc/cookbook/namedRoutes/NamedRoutes.lhs rename to doc/cookbook/named-routes/NamedRoutes.lhs diff --git a/doc/cookbook/named-routes/cookbook-named-routes.cabal b/doc/cookbook/named-routes/cookbook-named-routes.cabal new file mode 100644 index 000000000..13d95d6e9 --- /dev/null +++ b/doc/cookbook/named-routes/cookbook-named-routes.cabal @@ -0,0 +1,30 @@ +name: cookbook-named-routes +version: 0.1 +synopsis: + NamedRoutes - Generic servant API implementation cookbook example + +homepage: http://docs.servant.dev/ +license: BSD3 +license-file: ../../../servant/LICENSE +author: Servant Contributors +maintainer: haskell-servant-maintainers@googlegroups.com +build-type: Simple +cabal-version: >=1.10 +tested-with: GHC ==8.6.5 || ==8.8.3 || ==8.10.1 + +executable cookbook-named-routes + main-is: NamedRoutes.lhs + build-depends: + aeson >=1.2 + , base >=4 && <5 + , servant + , servant-client + , servant-client-core + , servant-server + , text + , wai >=3.2 + , warp >=3.2 + + default-language: Haskell2010 + ghc-options: -Wall -pgmL markdown-unlit + build-tool-depends: markdown-unlit:markdown-unlit diff --git a/doc/cookbook/namedRoutes/namedRoutes.cabal b/doc/cookbook/namedRoutes/namedRoutes.cabal deleted file mode 100644 index d8221ec28..000000000 --- a/doc/cookbook/namedRoutes/namedRoutes.cabal +++ /dev/null @@ -1,27 +0,0 @@ -name: namedRoutes -version: 0.1 -synopsis: NamedRoutes - Generic servant API implementation cookbook example -homepage: http://docs.servant.dev/ -license: BSD3 -license-file: ../../../servant/LICENSE -author: Servant Contributors -maintainer: haskell-servant-maintainers@googlegroups.com -build-type: Simple -cabal-version: >=1.10 -tested-with: GHC==8.6.5, GHC==8.8.3, GHC ==8.10.1 - -executable namedRoutes - main-is: NamedRoutes.lhs - build-depends: base == 4.* - , aeson >= 1.2 - , text - , servant - , servant-client - , servant-client-core - , servant-server - , wai >= 3.2 - , warp >= 3.2 - - default-language: Haskell2010 - ghc-options: -Wall -pgmL markdown-unlit - build-tool-depends: markdown-unlit:markdown-unlit diff --git a/doc/cookbook/structuring-apis/StructuringApis.lhs b/doc/cookbook/structuring-apis/StructuringApis.lhs index a0e603f0a..406147a5c 100644 --- a/doc/cookbook/structuring-apis/StructuringApis.lhs +++ b/doc/cookbook/structuring-apis/StructuringApis.lhs @@ -218,4 +218,4 @@ A simple case is approached in the [Record-based APIs: the simple case](../generic/Generic.html) cookbook, which deals with flat APIs where every endpoint is on the same level. Also, a more complex example with nested record is discussed in [Record-based APIs: the nested -records case](../namedRoutes/NamedRoutes.html) in which we implement an API tree with many branches. +records case](../named-routes/NamedRoutes.html) in which we implement an API tree with many branches.