Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ loadtest
gen_targets.http
gen_jwk.json
gen_private.json
.pytest_cache
.ruff_cache
2 changes: 1 addition & 1 deletion cabal.project.freeze
Original file line number Diff line number Diff line change
@@ -1 +1 @@
index-state: hackage.haskell.org 2026-04-18T18:42:36Z
index-state: hackage.haskell.org 2026-06-02T04:24:44Z
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nix/tools/devTools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
, curl
, devCabalOptions
, entr
, fd
, git
, graphviz
, hsie
, nix
, silver-searcher
, stdenv
, style
, tests
Expand Down Expand Up @@ -41,7 +41,7 @@ let
}
''
while true; do
(! ${silver-searcher}/bin/ag -l . | ${entr}/bin/entr -dr "$_arg_command" "''${_arg_leftovers[@]}")
(! ${fd}/bin/fd -H -E .git | ${entr}/bin/entr -dr "$_arg_command" "''${_arg_leftovers[@]}")
done
'';

Expand Down
10 changes: 4 additions & 6 deletions nix/tools/style.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
, buildToolbox
, checkedShellScript
, deadnix
, fd
, git
, hlint
, hsie
, nixpkgs-fmt
, python3Packages
, ruff
, silver-searcher
, statix
, stylish-haskell
, writeText
Expand All @@ -28,8 +28,7 @@ let
${nixpkgs-fmt}/bin/nixpkgs-fmt . > /dev/null 2> /dev/null

# Format Haskell files
# --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \
${fd}/bin/fd '\.l?hs$' \
| xargs ${stylish-haskell}/bin/stylish-haskell -i

# Format Python files
Expand Down Expand Up @@ -82,7 +81,7 @@ let

# ruff has gaps in scanning for unused code, so we use vulture
echo "Scanning python files for unused code..."
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?py$' . \
${fd}/bin/fd '\.l?py$' \
| xargs ${python3Packages.vulture}/bin/vulture --exclude docs/conf.py --min-confidence 80

echo "Linting python files..."
Expand All @@ -92,8 +91,7 @@ let
${hsie} check-aliases main src

echo "Linting Haskell files..."
# --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \
${fd}/bin/fd '\.l?hs$' \
| xargs ${hlint}/bin/hlint --hint=${hlintConfig}
'';

Expand Down
6 changes: 3 additions & 3 deletions src/PostgREST/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import qualified Data.List as L
import Data.Streaming.Network (bindPortTCP)
import qualified Data.Text as T
import qualified Network.HTTP.Types as HTTP
import qualified Network.HTTP.Types.Header as HTTP (hVary)
import Network.HTTP.Types.Header (hVary)
import qualified Network.Socket as NS
import PostgREST.Unix (createAndBindDomainSocket)
import Protolude hiding (Handler)
Expand Down Expand Up @@ -223,10 +223,10 @@ postgrestResponse appState conf@AppConfig{..} maybeSchemaCache jwtTime authResul
serverTimingHeaders timing = [serverTimingHeader timing | configServerTimingEnabled]

varyHeader :: HTTP.Header
varyHeader = (HTTP.hVary, "Accept, Prefer, Range")
varyHeader = (hVary, "Accept, Prefer, Range")

varyHeaderPresent :: [HTTP.Header] -> Bool
varyHeaderPresent = any (\(h, _v) -> h == HTTP.hVary)
varyHeaderPresent = any (\(h, _v) -> h == hVary)

withTiming :: (MonadError e m, MonadIO m) => AppConfig -> m a -> m (Maybe Double, a)
withTiming AppConfig{configServerTimingEnabled} f = if configServerTimingEnabled
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# When updating, update GHC version in .github/workflows/build.yaml as well.
resolver: lts-24.37 # 2026-04-15, GHC 9.10.3
resolver: lts-24.43 # 2026-05-29, GHC 9.10.3

nix:
packages:
Expand Down
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ packages:
hackage: warp-3.4.13
snapshots:
- completed:
sha256: 655e468f774beee1badf07dc4c45fb50288d5c66ce7bef6f487b7f92891a90b0
size: 728965
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/37.yaml
original: lts-24.37
sha256: 3c412a7c13dba6d3d808455a458e0776c58b6cf99b8a7961a2f5e55589d6f1d6
size: 729011
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/43.yaml
original: lts-24.43