diff --git a/Main.hs b/Main.hs index fee63d3..fedafb0 100644 --- a/Main.hs +++ b/Main.hs @@ -1,6 +1,5 @@ module Main where -import Control.Concurrent.Async (mapConcurrently_) import Control.Monad import Data.ByteString.Lazy (ByteString) import Data.ByteString.Lazy qualified as L @@ -54,7 +53,7 @@ handleArgs ["fetch"] = do , "546" -- NYC East Village , "452" -- Austin Seaholm ] - mapConcurrently_ (scrapeStore conn) stores + mapM_ (scrapeStore conn) stores printlog "done" changeCount <- SQL.totalChanges conn printlog $ "changed rows: " <> show changeCount diff --git a/flake.nix b/flake.nix index 453abbf..723d5f9 100644 --- a/flake.nix +++ b/flake.nix @@ -14,20 +14,21 @@ nixpkgs-fmt haskellPackages.fourmolu nodePackages.sql-formatter ]} nixpkgs-fmt . - fourmolu --mode inplace --indentation=2 $(git ls-files '*.hs') + fourmolu --mode inplace $(git ls-files '*.hs') for file in $(git ls-files "*.sql"); do sql-formatter --fix $file done ''; in - rec { + { inherit formatter; packages.default = pkgs.haskellPackages.callCabal2nix "traderjoes" ./. { }; - devShells.default = with pkgs; mkShell { - inputsFrom = [ packages.default.env ]; - packages = [ + devShells.default = pkgs.mkShell { + inputsFrom = [ self.packages.${system}.default.env ]; + packages = with pkgs; [ cabal-install haskell-language-server + haskellPackages.fourmolu hlint nodePackages.wrangler sqlite diff --git a/fourmolu.yaml b/fourmolu.yaml new file mode 100644 index 0000000..47e652d --- /dev/null +++ b/fourmolu.yaml @@ -0,0 +1 @@ +indentation: 2